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
ptrto a logical endpoint represented byle_idat the offsetoffset. The memory must have been allocated viacuMemCreateorcudaMallocAsync. The intendedsizeof the bind, theoffsetin the logical endpoint range andptrmust be multiples of the value forbindAlignmentas returned bycuLogicalEndpointGetLimits. Thesizecannot be larger than the size of the allocated memory. Similarly thesize+offsetcannot be larger than the total size of the logical endpoint. 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. For multicast endpoints, the device named bydevmust have been added to the multicast team viacuLogicalEndpointAddDevice. For unicast endpoints the device named bydevmust be the owner device specified duringcuLogicalEndpointCreateviaCUlogicalEndpointProp.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 returnCUDA_ERROR_INVALID_VALUEifcuLogicalEndpointQueryhas not been called for the logical endpoint to ensure that the endpoint is ready for memory binding. Note that this call will returnCUDA_ERROR_OUT_OF_MEMORYif there are insufficient resources required to perform the bind. This call may also returnCUDA_ERROR_SYSTEM_NOT_READYif the necessary system software is not initialized or running. This call may returnCUDA_ERROR_ILLEGAL_STATEif 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