-
-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Milestone
Description
cuMemAdvise() changed with CUDA 13.0, into:
CUresult cuMemAdvise (
CUdeviceptr devPtr,
size_t count,
CUmem_advise advice,
CUmemLocation location )
The difference is in the last parameter: It used to be a CUdevice device, now it's a CUmemLocation. This can be any of:
CU_MEM_LOCATION_TYPE_INVALID = 0x0,
CU_MEM_LOCATION_TYPE_DEVICE = 0x1, /**< Location is a device location, thus id is a device ordinal */
CU_MEM_LOCATION_TYPE_HOST = 0x2, /**< Location is host, id is ignored */
CU_MEM_LOCATION_TYPE_HOST_NUMA = 0x3, /**< Location is a host NUMA node, thus id is a host NUMA node id */
CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT = 0x4, /**< Location is a host NUMA node of the current thread, id is ignored */
CU_MEM_LOCATION_TYPE_MAX = 0x7FFFFFFF
with the first two being invalid/unusable. cuMemPrefetchAsync() also changed similarly.
Let's support the new, richer parameter type. Also, need to pay attention to CU_DEVICE_CPU as the device ID.