Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
add sync before unregister nvshmem_buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
chuangz0 committed Jan 17, 2024
1 parent 66b3217 commit 8284480
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class nvshmem_device_reference {
: pointer_(static_cast<DataTypeT*>(nvshmem_ref.pointer)),
typed_stride_(nvshmem_ref.stride / sizeof(DataTypeT))
{
assert(gref.stride % sizeof(DataTypeT) == 0);
assert(nvshmem_ref.stride % sizeof(DataTypeT) == 0);
}

__device__ nvshmem_device_reference() = delete;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/wholememory_ops/gather_op_impl_nvshmem.cu
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ wholememory_error_code_t wholememory_gather_nvshmem(
p_env_fns,
stream);
// ungistre
WM_CUDA_CHECK(cudaStreamSynchronize(stream));
if (nvshmemx_buffer_unregister(temp_output_ptr) != 0) {
WHOLEMEMORY_ERROR("nvshmemx_buffer_unregister error in wholememory_gather_nvshmem");
}
Expand Down

0 comments on commit 8284480

Please sign in to comment.