Skip to content

Commit

Permalink
Fix rmm deallocate arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
gartavanis committed Dec 12, 2024
1 parent 1b3a6f2 commit 5821131
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pfsimulator/amps/common/rmm_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ extern "C" {

void* rmmAlloc(size_t bytes) {
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource(); // Points to `pool_mr`
return mr.allocate(bytes, cuda_stream_view(0));
return mr.allocate(bytes);
}

void rmmFree(void *p, size_t bytes) {
void rmmFree(void *p) {
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource(); // Points to `pool_mr`
mr.deallocate(p, bytes, cuda_stream_view(0));
mr.deallocate(p);
}
}

Expand Down
2 changes: 1 addition & 1 deletion pfsimulator/amps/common/rmm_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extern "C" {

void rmmInit();
void* rmmAlloc(size_t bytes);
void rmmFree(void *p, size_t bytes);
void rmmFree(void *p);

#ifdef __cplusplus
}
Expand Down

0 comments on commit 5821131

Please sign in to comment.