cuTENSOR Data Types

cutensorComputeType_t

enum cutensorComputeType_t

Brief

Encodes cuTENSOR’s compute type (see “User Guide - Accuracy Guarantees” for details).

Values:

CUTENSOR_R_MIN_16F = (1U << 0U)

real as a half

CUTENSOR_C_MIN_16F = (1U << 1U)

complex as a half

CUTENSOR_R_MIN_32F = (1U << 2U)

real as a float

CUTENSOR_C_MIN_32F = (1U << 3U)

complex as a float

CUTENSOR_R_MIN_64F = (1U << 4U)

real as a double

CUTENSOR_C_MIN_64F = (1U << 5U)

complex as a double

CUTENSOR_R_MIN_8U = (1U << 6U)

real as a uint8

CUTENSOR_R_MIN_32U = (1U << 7U)

real as a uint32

CUTENSOR_R_MIN_8I = (1U << 8U)

real as a int8

CUTENSOR_R_MIN_32I = (1U << 9U)

real as a int32


cutensorHandle_t

struct cutensorHandle_t

Brief

Opaque structure holding cuTENSOR’s library context.


cutensorTensorDescriptor_t

struct cutensorTensorDescriptor_t

Brief

Opaque structure representing a tensor descriptor.


cutensorContractionDescriptor_t

struct cutensorContractionDescriptor_t

Brief

Opaque structure representing a tensor contraction descriptor.


cutensorContractionFind_t

struct cutensorContractionFind_t

Brief

Opaque structure representing a candidate.


cutensorContractionPlan_t

struct cutensorContractionPlan_t

Brief

Opaque structure representing a plan.


cutensorAlgo_t

enum cutensorAlgo_t

Brief

Allows users to specify the algorithm to be used for performing the tensor contraction.

Details

This enum gives users finer control over which algorithm should be executed by cutensorContraction(); values >= 0 correspond to certain sub-algorithms of GETT.

Values:

CUTENSOR_ALGO_GETT = -4

Choose the GETT algorithm.

CUTENSOR_ALGO_TGETT = -3

Transpose (A or B) + GETT.

CUTENSOR_ALGO_TTGT = -2

Transpose-Transpose-GEMM-Transpose (requires additional memory)

CUTENSOR_ALGO_DEFAULT = -1

Lets the internal heuristic choose.


cutensorWorksizePreference_t

enum cutensorWorksizePreference_t

Values:

CUTENSOR_WORKSPACE_MIN = 1

At least one algorithm will be available.

The most suitable algorithm will be available.

CUTENSOR_WORKSPACE_MAX = 3

All algorithms will be available.


cutensorOperator_t

enum cutensorOperator_t

Brief

This enum captures all unary and binary element-wise operations supported by the cuTENSOR library.

Values:

CUTENSOR_OP_IDENTITY = 1

Identity operator (i.e., elements are not changed)

CUTENSOR_OP_SQRT = 2

Square root.

CUTENSOR_OP_RELU = 8

Rectified linear unit.

CUTENSOR_OP_CONJ = 9

Complex conjugate.

CUTENSOR_OP_RCP = 10

Reciprocal.

CUTENSOR_OP_SIGMOID = 11

y=1/(1+exp(-x))

CUTENSOR_OP_TANH = 12

y=tanh(x)

CUTENSOR_OP_EXP = 22

Exponentiation.

CUTENSOR_OP_LOG = 23

Log (base e).

CUTENSOR_OP_ABS = 24

Absolute value.

CUTENSOR_OP_NEG = 25

Negation.

CUTENSOR_OP_SIN = 26

Sine.

CUTENSOR_OP_COS = 27

Cosine.

CUTENSOR_OP_TAN = 28

Tangent.

CUTENSOR_OP_SINH = 29

Hyperbolic sine.

CUTENSOR_OP_COSH = 30

Hyperbolic cosine.

CUTENSOR_OP_ASIN = 31

Inverse sine.

CUTENSOR_OP_ACOS = 32

Inverse cosine.

CUTENSOR_OP_ATAN = 33

Inverse tangent.

CUTENSOR_OP_ASINH = 34

Inverse hyperbolic sine.

CUTENSOR_OP_ACOSH = 35

Inverse hyperbolic cosine.

CUTENSOR_OP_ATANH = 36

Inverse hyperbolic tangent.

CUTENSOR_OP_CEIL = 37

Ceiling.

CUTENSOR_OP_FLOOR = 38

Floor.

CUTENSOR_OP_ADD = 3

Addition of two elements.

CUTENSOR_OP_MUL = 5

Multiplication of two elements.

CUTENSOR_OP_MAX = 6

Maximum of two elements.

CUTENSOR_OP_MIN = 7

Minimum of two elements.

CUTENSOR_OP_UNKNOWN = 126

reserved for internal use only


cutensorStatus_t

enum cutensorStatus_t

Brief

cuTENSOR status type returns

Details

The type is used for function status returns. All cuTENSOR library functions return their status, which can have the following values.

Values:

CUTENSOR_STATUS_SUCCESS = 0

The operation completed successfully.

CUTENSOR_STATUS_NOT_INITIALIZED = 1

The cuTENSOR library was not initialized.

CUTENSOR_STATUS_ALLOC_FAILED = 3

Resource allocation failed inside the cuTENSOR library.

CUTENSOR_STATUS_INVALID_VALUE = 7

An unsupported value or parameter was passed to the function (indicates an user error).

CUTENSOR_STATUS_ARCH_MISMATCH = 8

Indicates that the device is either not ready, or the target architecture is not supported.

CUTENSOR_STATUS_MAPPING_ERROR = 11

An access to GPU memory space failed, which is usually caused by a failure to bind a texture.

CUTENSOR_STATUS_EXECUTION_FAILED = 13

The GPU program failed to execute. This is often caused by a launch failure of the kernel on the GPU, which can be caused by multiple reasons.

CUTENSOR_STATUS_INTERNAL_ERROR = 14

An internal cuTENSOR error has occurred.

CUTENSOR_STATUS_NOT_SUPPORTED = 15

The requested operation is not supported.

CUTENSOR_STATUS_LICENSE_ERROR = 16

The functionality requested requires some license and an error was detected when trying to check the current licensing.

CUTENSOR_STATUS_CUBLAS_ERROR = 17

A call to CUBLAS did not succeed.

CUTENSOR_STATUS_CUDA_ERROR = 18

Some unknown CUDA error has occurred.

CUTENSOR_STATUS_INSUFFICIENT_WORKSPACE = 19

The provided workspace was insufficient.

CUTENSOR_STATUS_INSUFFICIENT_DRIVER = 20

Indicates that the driver version is insufficient.