Skip to content

Commit

Permalink
fix offset
Browse files Browse the repository at this point in the history
  • Loading branch information
eaypek-tfh committed Jan 28, 2025
1 parent 8aa7c52 commit 2d0ed57
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/temp-branch-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Branch - Build and push docker image
on:
push:
branches:
- "test-benchmark"
- "fix/test-benchmark-chunked-page-lock"

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand Down
2 changes: 1 addition & 1 deletion deploy/stage/common-values-iris-mpc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ghcr.io/worldcoin/iris-mpc:a76986f433af1327232a946766a9e1467048cf4a"
image: "ghcr.io/worldcoin/iris-mpc:1654b9cbda7d59684ce026c04efeaa89f12f329d"

environment: stage
replicaCount: 1
Expand Down
5 changes: 3 additions & 2 deletions iris-mpc-gpu/src/helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,18 @@ pub fn register_host_memory(
chunk_offset + chunk_length
);
let size = chunk_length / device_manager.device_count();
let offset = chunk_offset / device_manager.device_count();
for (device_index, device) in device_manager.devices().iter().enumerate() {
device.bind_to_thread().unwrap();
unsafe {
let _ = cudarc::driver::sys::lib().cuMemHostRegister_v2(
(db.limb_0[device_index] + (chunk_offset * code_length) as u64) as *mut _,
(db.limb_0[device_index] + (offset * code_length) as u64) as *mut _,
size * code_length,
CU_MEMHOSTALLOC_PORTABLE,
);

let _ = cudarc::driver::sys::lib().cuMemHostRegister_v2(
(db.limb_1[device_index] + (chunk_offset * code_length) as u64) as *mut _,
(db.limb_1[device_index] + (offset * code_length) as u64) as *mut _,
size * code_length,
CU_MEMHOSTALLOC_PORTABLE,
);
Expand Down

0 comments on commit 2d0ed57

Please sign in to comment.