cuda.bindings._v2.driver.logical_endpoint_bind_addr#

cuda.bindings._v2.driver.logical_endpoint_bind_addr(
uint32_t le_id,
int dev,
uint64_t offset,
intptr_t ptr,
uint64_t size,
unsigned long long flags,
)#

Bind a memory allocation represented by a virtual address to a logical endpoint.

Binds the memory allocation specified by its mapped address ptr to a logical endpoint represented by le_id at the offset offset. The memory must have been allocated via cuMemCreate or cudaMallocAsync. The intended size of the bind, the offset in the logical endpoint range and ptr must be multiples of the value for bindAlignment as returned by cuLogicalEndpointGetLimits. The size cannot be larger than the size of the allocated memory. Similarly the size + offset cannot be larger than the total size of the logical endpoint. For device memory, i.e., type CU_MEM_LOCATION_TYPE_DEVICE, the memory allocation must have been created on the device specified by dev. For host NUMA memory, i.e., type CU_MEM_LOCATION_TYPE_HOST_NUMA, the memory allocation must have been created on the CPU NUMA node closest to dev. That is, the value returned when querying CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID for dev, must be the CPU NUMA node where the memory was allocated. For multicast endpoints, the device named by dev must have been added to the multicast team via cuLogicalEndpointAddDevice. For unicast endpoints the device named by dev must be the owner device specified during cuLogicalEndpointCreate via CUlogicalEndpointProp.unicast.device. Externally shareable as well as imported multicast endpoints can be bound only to externally shareable memory. Imported unicast endpoints cannot be bound to any memory. This call will return CUDA_ERROR_INVALID_VALUE if cuLogicalEndpointQuery has not been called for the logical endpoint to ensure that the endpoint is ready for memory binding. 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 return CUDA_ERROR_ILLEGAL_STATE if the system configuration is in an illegal state. In such cases, to continue using logical endpoints, verify that the system configuration is in a valid state and all required driver daemons are running properly.

Parameters:
  • le_id (uint32_t) – Logical endpoint to which memory will be associated.

  • dev (int) – Device on which the memory will be bound to the logical endpoint.

  • offset (uint64_t) – Offset into the logical endpoint space.

  • ptr (intptr_t) – Virtual address of the memory allocation.

  • size (uint64_t) – Size of memory that will be bound to the logical endpoint.

  • flags (unsigned long long) – Flags for future use, must be zero for now.

See also

cuLogicalEndpointBindAddr