pub unsafe extern "C" fn cutensorMpCreateTensorDescriptor(
handle: cutensorMpHandle_t,
desc: *mut cutensorMpTensorDescriptor_t,
numModes: u32,
extent: *const i64,
elementStride: *const i64,
blockSize: *const i64,
blockStride: *const i64,
nranksPerMode: *const i64,
nranks: u32,
ranks: *const i32,
dataType: cudaDataType_t,
) -> cutensorStatus_tExpand description
Creates a distributed tensor descriptor for multi-process tensor operations.
This function creates a tensor descriptor that defines the structure and distribution of a multi-dimensional tensor across multiple processes. Unlike regular cuTENSOR tensor descriptors, this descriptor includes information about how the tensor is partitioned and distributed across different processes in the MPI communicator.
The tensor is described by its modes (dimensions), extents (sizes along each mode), and strides for elements and blocks. The distribution is specified through block sizes, block strides, and nranks-per-mode, which determine how the tensor data is partitioned across the participating processes.
The user is responsible for calling cutensorMpDestroyTensorDescriptor to free the resources associated with the descriptor once it is no longer needed.
Remark
non-blocking, no reentrant, and thread-safe.
§Parameters
handle: Opaque handle holding cutensorMp’s library context.desc: Pointer to the address where the allocated tensor descriptor object will be stored.numModes: Number of modes (dimensions) in the tensor (must be greater than zero).extent: Extent (size) of each mode (size: numModes, all values must be greater than zero).elementStride: Stride between consecutive elements in each mode (size: numModes).blockSize: Size of each block along each mode for distribution (size: numModes), passing null will using extent[i]/nranksPerMode[i].blockStride: Stride between consecutive blocks in each mode (size: numModes).nranksPerMode: Number of processes along each mode (size: numModes).nranks: Total number of ranks (processes) participating in the tensor distribution.ranks: Array of rank IDs for each participating process (size: nranks), passing null will use the range [0, nranks).dataType: Data type of the tensor elements.
§Return value
cutensorStatus_t::CUTENSOR_STATUS_INVALID_VALUE: if some input data is invalid (this typically indicates a user error).cutensorStatus_t::CUTENSOR_STATUS_NOT_INITIALIZED: if the handle is not initialized.cutensorStatus_t::CUTENSOR_STATUS_NOT_SUPPORTED: if the requested descriptor configuration is not supported.cutensorStatus_t::CUTENSOR_STATUS_SUCCESS: The operation completed successfully.