We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent def30e8 commit 3c66fbeCopy full SHA for 3c66fbe
source/adapters/cuda/memory.cpp
@@ -43,8 +43,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urMemBufferCreate(
43
BufferMem::AllocMode AllocMode = BufferMem::AllocMode::Classic;
44
45
if ((flags & UR_MEM_FLAG_USE_HOST_POINTER) && EnableUseHostPtr) {
46
+ UR_CHECK_ERROR(
47
+ cuMemHostRegister(HostPtr, size, CU_MEMHOSTREGISTER_DEVICEMAP));
48
AllocMode = BufferMem::AllocMode::UseHostPtr;
49
} else if (flags & UR_MEM_FLAG_ALLOC_HOST_POINTER) {
50
+ UR_CHECK_ERROR(cuMemAllocHost(&HostPtr, size));
51
AllocMode = BufferMem::AllocMode::AllocHostPtr;
52
} else if (flags & UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER) {
53
AllocMode = BufferMem::AllocMode::CopyIn;
0 commit comments