Skip to content

Commit

Permalink
try cuMemAlloc_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Jan 24, 2025
1 parent 4e80dbc commit 12ab844
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions iris-mpc-gpu/src/helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,14 @@ pub fn register_host_memory(
for (device_index, device) in device_manager.devices().iter().enumerate() {
device.bind_to_thread().unwrap();
unsafe {
let _ = cudarc::driver::sys::lib().cuMemHostRegister_v2(
let _ = cudarc::driver::sys::lib().cuMemAlloc_v2(
db.limb_0[device_index] as *mut _,
max_size * code_length,
CU_MEMHOSTALLOC_PORTABLE,
);

let _ = cudarc::driver::sys::lib().cuMemHostRegister_v2(
let _ = cudarc::driver::sys::lib().cuMemAlloc_v2(
db.limb_1[device_index] as *mut _,
max_size * code_length,
CU_MEMHOSTALLOC_PORTABLE,
);
}
}
Expand Down

0 comments on commit 12ab844

Please sign in to comment.