Skip to content

Commit

Permalink
Remove pre-fetching from DB (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielle-tfh authored Sep 30, 2024
1 parent 1c0567f commit 170b19e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
21 changes: 1 addition & 20 deletions iris-mpc-gpu/src/dot/share_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use cudarc::{
CudaBlas,
},
driver::{
result::{self, malloc_async, malloc_managed, mem_prefetch_async},
result::{self, malloc_async, malloc_managed},
sys::{CUdeviceptr, CUmemAttach_flags},
CudaFunction, CudaSlice, CudaStream, CudaView, DevicePtr, DeviceSlice, LaunchAsync,
},
Expand Down Expand Up @@ -340,25 +340,6 @@ impl ShareDB {
.unwrap();
}
}

// Try prefetching the db to device already
for mem in [&db.code_gr.limb_0, &db.code_gr.limb_1] {
unsafe {
mem_prefetch_async(
mem[device_index],
db_lens[device_index] * code_len,
cudarc::driver::sys::CUmemLocation_st {
type_:
cudarc::driver::sys::CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE,
..Default::default()
},
*self.device_manager.device(device_index).cu_stream(),
)
.unwrap();
};
}

self.device_manager.synchronize_all();
}
}

Expand Down
6 changes: 0 additions & 6 deletions iris-mpc-gpu/src/helpers/device_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ impl DeviceManager {
}
}

pub fn synchronize_all(&self) {
for i in 0..self.devices.len() {
self.devices[i].synchronize().unwrap();
}
}

pub fn create_events(&self) -> Vec<CUevent> {
let mut events = vec![];
for idx in 0..self.devices.len() {
Expand Down

0 comments on commit 170b19e

Please sign in to comment.