cuda.bindings._v2.driver.logical_endpoint_bind_mem#
- cuda.bindings._v2.driver.logical_endpoint_bind_mem(
- uint32_t le_id,
- int dev,
- uint64_t offset,
- uint64_t mem_handle,
- uint64_t mem_offset,
- uint64_t size,
- unsigned long long flags,
Binds memory object represented by a handle to the logical endpoint.
Binds the memory allocation specified by
mem_handleto a logical endpoint represented byle_idat the offsetoffset. The memory must have been allocated viacuMemCreate. The intendedsizeof the bind, the offset in the logical endpoint rangeoffsetand the offset in the memory handlemem_offsetmust be multiples of the value forbindAlignmentas returned bycuLogicalEndpointGetLimits. Thesize+mem_offsetcannot 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.
mem_handle (uint64_t) – Handle representing a memory allocation.
mem_offset (uint64_t) – Offset into the memory for the attachment.
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
cuLogicalEndpointBindMem