cuda.bindings._v2.driver.multicast_bind_addr_v2#
- cuda.bindings._v2.driver.multicast_bind_addr_v2(
- uint64_t mc_handle,
- int dev,
- size_t mc_offset,
- uint64_t memptr,
- size_t size,
- unsigned long long flags,
Bind a memory allocation represented by a virtual address to a multicast object.
Binds a memory allocation specified by its mapped address
memptrto a multicast object represented bymc_handle. The binding will be applicable for the devicedev. The memory must have been allocated viacuMemCreateorcudaMallocAsync. The intendedsizeof the bind, the offset in the multicast rangemc_offsetandmemptrmust be a multiple of the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_MINIMUM. For best performance however,size,mc_offsetandmemptrshould be aligned to the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_RECOMMENDED. Thesizecannot be larger than the size of the allocated memory. Similarly thesize+mc_offsetcannot be larger than the total size of the multicast object. On systems with Rubin+ (SM_107+) GPUs,memptrmay be aligned to 256 instead of the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_MINIMUMorCU_MULTICAST_GRANULARITY_RECOMMENDED. In such a case thesize+memptrcannot be larger than the size of the allocated memory. Similarly thesize+mc_offset+ the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_MINIMUMcannot be larger than the size of the than the size of the multicast object. The next available mc_offset for the next bind will be mc_offset + size + the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_MINIMUM. Also note that the ability to accept amemptrthat is not aligned to the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_MINIMUMorCU_MULTICAST_GRANULARITY_RECOMMENDEDis limited by HW resources and may result in errorCUDA_ERROR_MULTICAST_RESOURCE_FULL. For device memory, i.e., typeCU_MEM_LOCATION_TYPE_DEVICE, the memory allocation must have been created on the device specified bydev. For host NUMA memory, i.e., typeCU_MEM_LOCATION_TYPE_HOST_NUMA, the memory allocation must have been created on the CPU NUMA node closest todev. That is, the value returned when queryingCU_DEVICE_ATTRIBUTE_HOST_NUMA_IDfordev, must be the CPU NUMA node where the memory was allocated. In both cases, the device named bydevmust have been added to the multicast team viacuMulticastAddDevice. Externally shareable as well as imported multicast objects can be bound only to externally shareable memory. Note that this call will return CUDA_ERROR_OUT_OF_MEMORY if there are insufficient resources required to perform the bind. This call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary system software is not initialized or running. This call may fail if the devices added viacuMulticastAddDevicedo not belong to the same clique. This call may return CUDA_ERROR_ILLEGAL_STATE if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and all required driver daemons are running properly.- Parameters:
mc_handle (uint64_t) – Handle representing a multicast object.
dev (int) – The device that for which the multicast memory binding will be applicable.
mc_offset (size_t) – Offset into multicast va range for attachment.
memptr (uint64_t) – Virtual address of the memory allocation.
size (size_t) – Size of memory that will be bound to the multicast object.
flags (unsigned long long) – Flags for future use, must be zero now.
See also
cuMulticastBindAddr_v2