cuda.bindings._v2.driver.multicast_bind_mem#
- cuda.bindings._v2.driver.multicast_bind_mem(
- uint64_t mc_handle,
- size_t mc_offset,
- uint64_t mem_handle,
- size_t mem_offset,
- size_t size,
- unsigned long long flags,
Bind a memory allocation represented by a handle to a multicast object.
Binds a memory allocation specified by
mem_handleand created viacuMemCreateto a multicast object represented bymc_handleand created viacuMulticastCreate. The intendedsizeof the bind, the offset in the multicast rangemc_offsetas well as the offset in the memorymem_offsetmust be a multiple of the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_MINIMUM. For best performance however,size,mc_offsetandmem_offsetshould be aligned to the granularity of the memory allocation(seecuMemGetAllocationGranularity) or to the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_RECOMMENDED. Thesize+mem_offsetcannot be larger than the size of the allocated memory. Similarly thesize+mc_offsetcannot be larger than the size of the multicast object. On systems with Rubin+ (SM_107+) GPUs,mem_offsetmay be aligned to 256 instead of the value returned bycuMulticastGetGranularitywith the flagCU_MULTICAST_GRANULARITY_MINIMUMorCU_MULTICAST_GRANULARITY_RECOMMENDED. In such a case thesize+mem_offsetcannot 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 amem_offsetthat 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. The memory allocation must have beeen created on one of the devices that was 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.
mc_offset (size_t) – Offset into the multicast object for attachment.
mem_handle (uint64_t) – Handle representing a memory allocation.
mem_offset (size_t) – Offset into the memory for attachment.
size (size_t) – Size of the memory that will be bound to the multicast object.
flags (unsigned long long) – Flags for future use, must be zero for now.
See also
cuMulticastBindMem