cuda.bindings._v2.driver.mem_set_access#

cuda.bindings._v2.driver.mem_set_access(uint64_t ptr, size_t size, desc, size_t count)#

Set the access flags for each location specified in desc for the given virtual address range.

Given the virtual address range via ptr and size, and the locations in the array given by desc and count, set the access flags for the target locations. The range must be a fully mapped address range containing all allocations created by cuMemMap / cuMemCreate. Users cannot specify CU_MEM_LOCATION_TYPE_HOST_NUMA accessibility for allocations created on with other location types. Note: When CUmemAccessDesc::CUmemLocation::type is CU_MEM_LOCATION_TYPE_HOST_NUMA, CUmemAccessDesc::CUmemLocation::id is ignored. When setting the access flags for a virtual address range mapping a multicast object, ptr and size must be aligned to the value returned by cuMulticastGetGranularity with the flag CU_MULTICAST_MINIMUM_GRANULARITY. For best performance however, it is recommended that ptr and size be aligned to the value returned by cuMulticastGetGranularity with the flag CU_MULTICAST_RECOMMENDED_GRANULARITY.

Parameters:
  • ptr (uint64_t) – Starting address for the virtual address range.

  • size (size_t) – Length of the virtual address range.

  • desc (intptr_t) – Array of CUmemAccessDesc that describe how to change the.

  • count (size_t) – Number of CUmemAccessDesc in desc.

See also

cuMemSetAccess