elementwise_trinary_execute#

nvmath.bindings.cutensor.elementwise_trinary_execute(
intptr_t handle,
intptr_t plan,
intptr_t alpha,
intptr_t a,
intptr_t beta,
intptr_t b,
intptr_t gamma,
intptr_t c,
intptr_t d,
intptr_t stream,
)[source]#

Performs an element-wise tensor operation for three input tensors (see cutensorcreateElementwiseTrinary).

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

  • plan (intptr_t) – Opaque handle holding all information about the desired elementwise operation (created by cutensorcreateElementwiseTrinary followed by cutensorcreatePlan).

  • alpha (intptr_t) – Scaling factor for a (see cutensorOperationdescriptorGetattribute(desc, cUTENSOR_OPERaTION_ScaLaR_TYPE) to query the expected data 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 (described by desca as part of cutensorcreateElementwiseTrinary). Pointer to the GPU-accessible memory. The data accessed via this pointer must not overlap with the elements written to d.

  • beta (intptr_t) – Scaling factor for b (see cutensorOperationdescriptorGetattribute(desc, cUTENSOR_OPERaTION_ScaLaR_TYPE) to query the expected data type). Pointer to the host memory. If beta is zero, b is not read and the corresponding unary operator is not applied.

  • b (intptr_t) – Multi-mode tensor (described by descb as part of cutensorcreateElementwiseTrinary). Pointer to the GPU-accessible memory. The data accessed via this pointer must not overlap with the elements written to d.

  • gamma (intptr_t) – Scaling factor for c (see cutensorOperationdescriptorGetattribute(desc, cUTENSOR_OPERaTION_ScaLaR_TYPE) to query the expected data type). Pointer to the host memory. If gamma is zero, c is not read and the corresponding unary operator is not applied.

  • c (intptr_t) – Multi-mode tensor (described by descc as part of cutensorcreateElementwiseTrinary). Pointer to the GPU-accessible memory. The data accessed via this pointer must not overlap with the elements written to d.

  • d (intptr_t) – Multi-mode tensor (described by descd as part of cutensorcreateElementwiseTrinary). Pointer to the GPU-accessible memory (c and d may be identical, if and only if descc == descd).

  • stream (intptr_t) – The cUda stream used to perform the operation.

See also

cutensorElementwiseTrinaryExecute