create_permutation#
-
nvmath.
bindings. cutensor. create_permutation( - intptr_t handle,
- intptr_t desc_a,
- mode_a,
- int op_a,
- intptr_t desc_b,
- mode_b,
- intptr_t desc_compute,
This function creates an operation descriptor for a tensor permutation.
- Parameters:
handle (intptr_t) – Opaque handle holding cuTENSOR’s library context.
desc_a (intptr_t) – The descriptor that holds information about the data type, modes, and strides of A.
mode_a (object) –
Array of size desc_a->numModes that holds the names of the modes of A (e.g., if A_{a,b,c} => mode_a = {‘a’,’b’,’c’}). It can be:
an
intas the pointer address to the array, ora Python sequence of
int32_t.
op_a (Operator) – Unary operator that will be applied to each element of A before it is further processed. The original data of this tensor remains unchanged.
desc_b (intptr_t) – The descriptor that holds information about the data type, modes, and strides of B.
mode_b (object) –
Array of size desc_b->numModes that holds the names of the modes of B. It can be:
an
intas the pointer address to the array, ora Python sequence of
int32_t.
desc_compute (intptr_t) – Determines the precision in which this operations is performed.
- Returns:
This opaque struct gets allocated and filled with the information that encodes the requested permutation.
- Return type:
intptr_t
See also
cutensorCreatePermutation