Skip to content

Commit

Permalink
Brodey | host alloc (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
brodeynewman authored Jan 23, 2025
1 parent 9900a5c commit cd58f7c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions codegen/manual_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,3 +766,22 @@ cudaError_t cudaMallocManaged(void **devPtr, size_t size, unsigned int flags) {

return cudaSuccess;
}

cudaError_t cudaHostUnregister(void *ptr) {
/**
* The benefit of page-locked mem is to:
* "automatically accelerate calls to functions such as cudaMemcpy().
* Since the memory can be accessed directly by the device, it can be read or
* written with much higher bandwidth than pageable memory that has not been
* registered".
*
* Given that Scuda memcpy's happen over the wire, so there's no real benefit
* to creating page-locked memory on scuda clients.
* @TODO: ponder this more down the road.
*/
return cudaSuccess;
}

cudaError_t cudaHostRegister(void *devPtr, size_t size, unsigned int flags) {
return cudaSuccess;
}

0 comments on commit cd58f7c

Please sign in to comment.