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
descfor the given virtual address range.Given the virtual address range via
ptrandsize, and the locations in the array given bydescandcount, set the access flags for the target locations. The range must be a fully mapped address range containing all allocations created bycuMemMap/cuMemCreate. Users cannot specifyCU_MEM_LOCATION_TYPE_HOST_NUMAaccessibility for allocations created on with other location types. Note: WhenCUmemAccessDesc::CUmemLocation::type isCU_MEM_LOCATION_TYPE_HOST_NUMA,CUmemAccessDesc::CUmemLocation::id is ignored. When setting the access flags for a virtual address range mapping a multicast object,ptrandsizemust be aligned to the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_MINIMUM_GRANULARITY. For best performance however, it is recommended thatptrandsizebe aligned to the value returned bycuMulticastGetGranularitywith the flagCU_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
CUmemAccessDescthat describe how to change the.count (size_t) – Number of
CUmemAccessDescindesc.
See also
cuMemSetAccess