permute#

nvmath.bindings.cutensor.permute(
intptr_t handle,
intptr_t plan,
intptr_t alpha,
intptr_t a,
intptr_t b,
intptr_t stream,
)[source]#

Performs the tensor permutation that is encoded by plan (see cutensorCreatePermutation).

Parameters:
  • handle (intptr_t) – Opaque handle holding cuTENSOR’s library context.

  • plan (intptr_t) – Opaque handle holding all information about the desired tensor reduction (created by cutensorCreatePermutation followed by cutensorCreatePlan).

  • alpha (intptr_t) – Scaling factor for a (see cutensorOperationDescriptorGetattribute(desc, CUTENSOR_OPERaTION_SCaLaR_TYPE)). Pointer to the host memory. If alpha is zero, a is not read and the corresponding unary operator is not applied.

  • a (intptr_t) – Multi-mode tensor of type typea with nmodea modes. Pointer to the GPU-accessible memory. The data accessed via this pointer must not overlap with the elements written to D.

  • b (intptr_t) – Multi-mode tensor of type typeb with nmodeb modes. Pointer to the GPU-accessible memory.

  • stream (intptr_t) – The CUDa stream.

See also

cutensorPermute