Expand description
Raw FFI bindings for cuTENSOR and cuTENSORMg.
Prefer the safe singe-cutensor crate unless direct NVIDIA ABI access is required.
Structs§
- CUstream_
st - _IO_
FILE - _IO_
codecvt - _IO_
marker - _IO_
wide_ data - __
Bindgen Bitfield Unit - cuTensor
MpContraction Descriptor - cuTensor
MpContraction Plan - cuTensor
MpHandle - cuTensor
MpOperation Descriptor - cuTensor
MpPlan - cuTensor
MpPlan Preference - cuTensor
MpTensor Descriptor - cutensor
Block Sparse Tensor Descriptor - cutensor
Compute Descriptor - cutensor
Handle - cutensor
MgContraction Descriptor_ s - cutensor
MgContraction Find_ s - cutensor
MgContraction Plan_ s - cutensor
MgCopy Descriptor_ s - cutensor
MgCopy Plan_ s - cutensor
MgHandle_ s - cutensor
MgTensor Descriptor_ s - cutensor
Operation Descriptor - cutensor
Plan - cutensor
Plan Preference - cutensor
Tensor Descriptor
Enums§
- cuda
Data Type_ t - cutensor
Algo_ t - Allows users to specify the algorithm to be used for performing the desired tensor operation.
- cutensor
Autotune Mode_ t - This enum determines the mode with respect to cuTENSOR’s auto-tuning capability.
- cutensor
Cache Mode_ t - This enum defines what is considered a cache hit.
- cutensor
Compute Type_ t - cutensor
Data Type_ t - cutensor
JitMode_ t - This enum determines the mode with respect to cuTENSOR’s just-in-time compilation capability.
- cutensor
MgAlgo_ t - Represents the selected algorithm when planning for a contraction operation.
- cutensor
MgContraction Find Attribute_ t - cutensor
MgHost Device_ t - Enumerated device codes for host-side tensors.
- cutensor
MpAlgo_ t - cutensor
MpPlan Attribute_ t - cutensor
Operation Descriptor Attribute_ t - This enum lists all attributes of a
cutensorOperationDescriptor_tthat can be modified (seecutensorOperationDescriptorSetAttributeandcutensorOperationDescriptorGetAttribute). - cutensor
Operator_ t - This enum captures all unary and binary element-wise operations supported by the cuTENSOR library.
- cutensor
Plan Attribute_ t - This enum lists all attributes of a
cutensorPlan_tobject that can be retrieved viacutensorPlanGetAttribute. - cutensor
Plan Preference Attribute_ t - This enum lists all attributes of a
cutensorPlanPreference_tobject that can be modified. - cutensor
Status_ t - cuTENSOR status type returns
- cutensor
Worksize Preference_ t - This enum gives users finer control over the suggested workspace.
Constants§
- CUTENSORMP_
MAJOR - CUTENSORMP_
MINOR - CUTENSORMP_
PATCH - CUTENSORMP_
VERSION - CUTENSOR_
MAJOR - CUTENSOR_
MINOR - CUTENSOR_
PATCH - CUTENSOR_
VERSION
Statics§
- CUTENSOR_
COMPUTE_ ⚠DESC_ 3XTF32 - CUTENSOR_
COMPUTE_ ⚠DESC_ 4X16F - CUTENSOR_
COMPUTE_ ⚠DESC_ 8XIN T8 - CUTENSOR_
COMPUTE_ ⚠DESC_ 9X16BF - CUTENSOR_
COMPUTE_ ⚠DESC_ 16BF - CUTENSOR_
COMPUTE_ ⚠DESC_ 16F - CUTENSOR_
COMPUTE_ ⚠DESC_ 32F - CUTENSOR_
COMPUTE_ ⚠DESC_ 64F - CUTENSOR_
COMPUTE_ ⚠DESC_ TF32 - CUTENSOR_
C_ ⚠4I - CUTENSOR_
C_ ⚠4U - CUTENSOR_
C_ ⚠8I - CUTENSOR_
C_ ⚠8U - CUTENSOR_
C_ ⚠16BF - CUTENSOR_
C_ ⚠16F - CUTENSOR_
C_ ⚠16I - CUTENSOR_
C_ ⚠16U - CUTENSOR_
C_ ⚠32F - CUTENSOR_
C_ ⚠32I - CUTENSOR_
C_ ⚠32U - CUTENSOR_
C_ ⚠64F - CUTENSOR_
C_ ⚠64I - CUTENSOR_
C_ ⚠64U - CUTENSOR_
R_ ⚠4I - CUTENSOR_
R_ ⚠4U - CUTENSOR_
R_ ⚠8I - CUTENSOR_
R_ ⚠8U - CUTENSOR_
R_ ⚠16BF - CUTENSOR_
R_ ⚠16F - CUTENSOR_
R_ ⚠16I - CUTENSOR_
R_ ⚠16U - CUTENSOR_
R_ ⚠32F - CUTENSOR_
R_ ⚠32I - CUTENSOR_
R_ ⚠32U - CUTENSOR_
R_ ⚠64F - CUTENSOR_
R_ ⚠64I - CUTENSOR_
R_ ⚠64U
Functions§
- cutensor
Block ⚠Sparse Contract - This routine computes the block-sparse tensor contraction $D = alpha \* A \* B + beta \* C$. $$ \mathcal{D}{{modes}\mathcal{D}} \gets \alpha \* \mathcal{A}{{modes}\mathcal{A}} B_{{modes}\mathcal{B}} + \beta \mathcal{C}{{modes}_\mathcal{C}} $$
- cutensor
Contract ⚠ - This routine computes the tensor contraction $D = alpha \* A \* B + beta \* C$. $$ \mathcal{D}{{modes}\mathcal{D}} \gets \alpha \* \mathcal{A}{{modes}\mathcal{A}} B_{{modes}\mathcal{B}} + \beta \mathcal{C}{{modes}_\mathcal{C}} $$
- cutensor
Contract ⚠Trinary - This routine computes the tensor contraction $E = alpha \* A \* B \* C + beta \* D$. $$ \mathcal{E}{{modes}\mathcal{E}} \gets \alpha \* \mathcal{A}{{modes}\mathcal{A}} \mathcal{B}{{modes}\mathcal{B}} \mathcal{C}{{modes}\mathcal{C}} + \beta \mathcal{D}{{modes}\mathcal{D}} $$
- cutensor
Create ⚠ - Initializes the cuTENSOR library and allocates the memory for the library context.
- cutensor
Create ⚠Block Sparse Contraction - This function allocates a cutensorOperationDescriptor_t object that encodes a block-sparse tensor contraction of the form $D = \alpha \mathcal{A} \mathcal{B} + \beta \mathcal{C}$.
- cutensor
Create ⚠Block Sparse Tensor Descriptor - Create a block-sparse tensor descriptor.
- cutensor
Create ⚠Contraction - This function allocates a cutensorOperationDescriptor_t object that encodes a tensor contraction of the form $D = \alpha \mathcal{A} \mathcal{B} + \beta \mathcal{C}$.
- cutensor
Create ⚠Contraction Trinary - This function allocates a cutensorOperationDescriptor_t object that encodes a tensor contraction of the form $\mathcal{E} = \alpha \mathcal{A} \mathcal{B} \mathcal{C} + \beta \mathcal{D}$.
- cutensor
Create ⚠Elementwise Binary - This function creates an operation descriptor for an elementwise binary operation.
- cutensor
Create ⚠Elementwise Trinary - This function creates an operation descriptor that encodes an elementwise trinary operation.
- cutensor
Create ⚠Permutation - This function creates an operation descriptor for a tensor permutation.
- cutensor
Create ⚠Plan - This function allocates a cutensorPlan_t object, selects an appropriate kernel for a given operation (encoded by
desc) and prepares a plan that encodes the execution. - cutensor
Create ⚠Plan Preference - Allocates the cutensorPlanPreference_t, enabling users to limit the applicable kernels for a given plan/operation.
- cutensor
Create ⚠Reduction - Creates a cutensorOperatorDescriptor_t object that encodes a tensor reduction of the form $D = alpha \* opReduce(opA(A)) + beta \* opC(C)$.
- cutensor
Create ⚠Tensor Descriptor - Creates a tensor descriptor.
- cutensor
Destroy ⚠ - Frees all resources related to the provided library handle.
- cutensor
Destroy ⚠Block Sparse Tensor Descriptor - Frees all resources related to the provided block-sparse tensor descriptor.
- cutensor
Destroy ⚠Operation Descriptor - Frees all resources related to the provided descriptor.
- cutensor
Destroy ⚠Plan - Frees all resources related to the provided plan.
- cutensor
Destroy ⚠Plan Preference - Frees all resources related to the provided preference.
- cutensor
Destroy ⚠Tensor Descriptor - Frees all resources related to the provided tensor descriptor.
- cutensor
Elementwise ⚠Binary Execute - Performs an element-wise tensor operation for two input tensors (see
cutensorCreateElementwiseBinary) - cutensor
Elementwise ⚠Trinary Execute - Performs an element-wise tensor operation for three input tensors (see
cutensorCreateElementwiseTrinary) - cutensor
Estimate ⚠Workspace Size - Determines the required workspaceSize for the given operation encoded by
desc. - cutensor
GetCudart ⚠Version - Returns version number of the CUDA runtime that cuTENSOR was compiled against.
- cutensor
GetError ⚠String - Returns the description string for an error code.
- cutensor
GetVersion ⚠ - Returns Version number of the CUTENSOR library.
- cutensor
Handle ⚠Read Plan Cache From File - Reads a Plan-Cache from file and overwrites the cachelines of the provided handle.
- cutensor
Handle ⚠Resize Plan Cache - Resizes the plan cache.
- cutensor
Handle ⚠Write Plan Cache ToFile - Writes the Plan-Cache (that belongs to the provided handle) to file.
- cutensor
Logger ⚠Force Disable - This function disables logging for the entire run.
- cutensor
Logger ⚠Open File - This function opens a logging output file in the given path.
- cutensor
Logger ⚠SetCallback - This function sets the logging callback routine.
- cutensor
Logger ⚠SetFile - This function sets the logging output file.
- cutensor
Logger ⚠SetLevel - This function sets the value of the logging level.
- cutensor
Logger ⚠SetMask - This function sets the value of the log mask.
- cutensor
MgContraction ⚠ - Execute a contraction operation.
- cutensor
MgContraction ⚠Find SetAttribute - cutensor
MgContraction ⚠GetWorkspace - Computes the workspace that is needed for the contraction.
- cutensor
MgCopy ⚠ - Execute a copy operation.
- cutensor
MgCopy ⚠GetWorkspace - Computes the workspace that is needed for the copy.
- cutensor
MgCreate ⚠ - Create a library handle.
- cutensor
MgCreate ⚠Contraction Descriptor - Create a contraction descriptor.
- cutensor
MgCreate ⚠Contraction Find - Create a contraction find.
- cutensor
MgCreate ⚠Contraction Plan - Create a contraction plan.
- cutensor
MgCreate ⚠Copy Descriptor - Create a copy descriptor.
- cutensor
MgCreate ⚠Copy Plan - Create a copy plan.
- cutensor
MgCreate ⚠Tensor Descriptor - Create a tensor descriptor.
- cutensor
MgDestroy ⚠ - Destroy a library handle.
- cutensor
MgDestroy ⚠Contraction Descriptor - Destroy a contraction descriptor.
- cutensor
MgDestroy ⚠Contraction Find - Destroy a contraction find.
- cutensor
MgDestroy ⚠Contraction Plan - Destroy a contraction plan.
- cutensor
MgDestroy ⚠Copy Descriptor - Destroy a copy descriptor and free all its previously-allocated resources.
- cutensor
MgDestroy ⚠Copy Plan - Destroy a copy plan.
- cutensor
MgDestroy ⚠Tensor Descriptor - Destroy a tensor descriptor.
- cutensor
MpContract ⚠ - Performs a distributed tensor contraction across multiple processes.
- cutensor
MpCreate ⚠ - Initializes the cutensorMp library and creates a handle for distributed tensor operations.
- cutensor
MpCreate ⚠Contraction - Creates an operation descriptor that encodes a distributed tensor contraction.
- cutensor
MpCreate ⚠Plan - Creates an execution plan for distributed tensor contractions.
- cutensor
MpCreate ⚠Plan Preference - Creates a plan preference object for controlling distributed tensor operation planning.
- cutensor
MpCreate ⚠Tensor Descriptor - Creates a distributed tensor descriptor for multi-process tensor operations.
- cutensor
MpDestroy ⚠ - Frees all resources associated with the provided cutensorMp handle.
- cutensor
MpDestroy ⚠Operation Descriptor - Frees all resources related to the provided distributed contraction descriptor.
- cutensor
MpDestroy ⚠Plan - Frees all resources related to the provided distributed contraction plan.
- cutensor
MpDestroy ⚠Plan Preference - Frees all resources related to the provided plan preference object.
- cutensor
MpDestroy ⚠Tensor Descriptor - Frees all resources related to the provided distributed tensor descriptor.
- cutensor
MpPlan ⚠GetAttribute - Retrieves information about an already-created plan (see
cutensorPlanAttribute_t). - cutensor
Operation ⚠Descriptor GetAttribute - This function retrieves an attribute of the provided cutensorOperationDescriptor_t object (see
cutensorOperationDescriptorAttribute_t). - cutensor
Operation ⚠Descriptor SetAttribute - Set attribute of a cutensorOperationDescriptor_t object.
- cutensor
Permute ⚠ - Performs the tensor permutation that is encoded by
plan(seecutensorCreatePermutation). - cutensor
Plan ⚠GetAttribute - Retrieves information about an already-created plan (see
cutensorPlanAttribute_t) - cutensor
Plan ⚠Preference GetAttribute - Get attribute of a cutensorPlanPreference_t object.
- cutensor
Plan ⚠Preference SetAttribute - Set attribute of a cutensorPlanPreference_t object.
- cutensor
Read ⚠Kernel Cache From File - Reads a kernel cache from file and adds all non-existing JIT compiled kernels to the kernel cache.
- cutensor
Reduce ⚠ - Performs the tensor reduction that is encoded by
plan(seecutensorCreateReduction). - cutensor
Write ⚠Kernel Cache ToFile - Writes the —per library— kernel cache to file.
Type Aliases§
- FILE
- _IO_
lock_ t - __
off64_ t - __off_t
- __
uint64_ t - cutensor
Block Sparse Tensor Descriptor_ t - Opaque structure representing a block-sparse tensor descriptor.
- cutensor
Compute Descriptor_ t - Opaque structure representing a compute descriptor.
- cutensor
Handle_ t - Opaque structure holding cuTENSOR’s library context.
- cutensor
Logger Callback_ t - A function pointer type for logging.
- cutensor
MgContraction Descriptor_ t - Describes the contraction of two tensors into a third tensor with an optional source.
- cutensor
MgContraction Find_ t - Describes the algorithmic details of implementing a tensor contraction.
- cutensor
MgContraction Plan_ t - Describes a specific way to implement a contraction operation.
- cutensor
MgCopy Descriptor_ t - Describes the copy of a tensor from one data layout to another.
- cutensor
MgCopy Plan_ t - Describes a specific way to implement the copy operation.
- cutensor
MgHandle_ t - Encodes the devices that participate in operations.
- cutensor
MgTensor Descriptor_ t - Represents a tensor that may be distributed.
- cutensor
MpContraction Descriptor_ t - cutensor
MpContraction Plan_ t - cutensor
MpHandle_ t - cutensor
MpOperation Descriptor_ t - cutensor
MpPlan Preference_ t - cutensor
MpPlan_ t - cutensor
MpTensor Descriptor_ t - cutensor
Operation Descriptor_ t - Opaque structure representing any type of problem descriptor (e.g., contraction, reduction, elementwise).
- cutensor
Plan Preference_ t - Opaque structure that narrows down the space of applicable algorithms/variants/kernels.
- cutensor
Plan_ t - Opaque structure representing a plan (e.g, contraction, reduction, elementwise).
- cutensor
Tensor Descriptor_ t - Opaque structure representing a tensor descriptor.
- size_t