cuda.bindings._v2.driver.multicast_bind_addr#

cuda.bindings._v2.driver.multicast_bind_addr(
uint64_t mc_handle,
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 memptr to a multicast object represented by mc_handle. The memory must have been allocated via cuMemCreate or cudaMallocAsync. The intended size of the bind, the offset in the multicast range mc_offset and memptr must be a multiple of the value returned by cuMulticastGetGranularity with the flag CU_MULTICAST_GRANULARITY_MINIMUM. For best performance however, size, mc_offset and memptr should be aligned to the value returned by cuMulticastGetGranularity with the flag CU_MULTICAST_GRANULARITY_RECOMMENDED. The size cannot be larger than the size of the allocated memory. Similarly the size + mc_offset cannot be larger than the total size of the multicast object. On systems with Rubin+ (SM_107+) GPUs, memptr may be aligned to 256 instead of the value returned by cuMulticastGetGranularity with the flag CU_MULTICAST_GRANULARITY_MINIMUM or CU_MULTICAST_GRANULARITY_RECOMMENDED. In such a case the size + memptr cannot be larger than the size of the allocated memory. Similarly the size + mc_offset + the value returned by cuMulticastGetGranularity with the flag CU_MULTICAST_GRANULARITY_MINIMUM cannot 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 by cuMulticastGetGranularity with the flag CU_MULTICAST_GRANULARITY_MINIMUM. Also note that the ability to accept a memptr that is not aligned to the value returned by cuMulticastGetGranularity with the flag CU_MULTICAST_GRANULARITY_MINIMUM or CU_MULTICAST_GRANULARITY_RECOMMENDED is limited by HW resources and may result in error CUDA_ERROR_MULTICAST_RESOURCE_FULL. The memory allocation must have beeen created on one of the devices that was added to the multicast team via cuMulticastAddDevice. 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 via cuMulticastAddDevice do 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.

  • 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