Skip to main content

cutensorMgCreate

Function cutensorMgCreate 

Source
pub unsafe extern "C" fn cutensorMgCreate(
    handle: *mut cutensorMgHandle_t,
    numDevices: u32,
    devices: *const i32,
) -> cutensorStatus_t
Expand description

Create a library handle.

The handle contains information about the devices that should be participating in calculations. All devices that hold any tensor data or participate in any of cuTENSORMg’s operations should also be included in the handle. Each device may only occur once in the list. It is advisable that all devices are identical (i.e., have the same peak performance) to avoid load-balancing issues, and are connected via NVLink to avoid costly device-host-device transfers. This call will enable peering between all devices that have been passed to it, if possible.

Remark

blocking, no reentrant, and thread-safe.

§Parameters

  • handle: The resulting library handle.
  • numDevices: The number of devices participating in all subsequent computations.
  • devices: The devices that participate in all computations.

§Return value