Skip to main content

Crate singe_cutensor_sys

Crate singe_cutensor_sys 

Source
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
__BindgenBitfieldUnit
cuTensorMpContractionDescriptor
cuTensorMpContractionPlan
cuTensorMpHandle
cuTensorMpOperationDescriptor
cuTensorMpPlan
cuTensorMpPlanPreference
cuTensorMpTensorDescriptor
cutensorBlockSparseTensorDescriptor
cutensorComputeDescriptor
cutensorHandle
cutensorMgContractionDescriptor_s
cutensorMgContractionFind_s
cutensorMgContractionPlan_s
cutensorMgCopyDescriptor_s
cutensorMgCopyPlan_s
cutensorMgHandle_s
cutensorMgTensorDescriptor_s
cutensorOperationDescriptor
cutensorPlan
cutensorPlanPreference
cutensorTensorDescriptor

Enums§

cudaDataType_t
cutensorAlgo_t
Allows users to specify the algorithm to be used for performing the desired tensor operation.
cutensorAutotuneMode_t
This enum determines the mode with respect to cuTENSOR’s auto-tuning capability.
cutensorCacheMode_t
This enum defines what is considered a cache hit.
cutensorComputeType_t
cutensorDataType_t
cutensorJitMode_t
This enum determines the mode with respect to cuTENSOR’s just-in-time compilation capability.
cutensorMgAlgo_t
Represents the selected algorithm when planning for a contraction operation.
cutensorMgContractionFindAttribute_t
cutensorMgHostDevice_t
Enumerated device codes for host-side tensors.
cutensorMpAlgo_t
cutensorMpPlanAttribute_t
cutensorOperationDescriptorAttribute_t
This enum lists all attributes of a cutensorOperationDescriptor_t that can be modified (see cutensorOperationDescriptorSetAttribute and cutensorOperationDescriptorGetAttribute).
cutensorOperator_t
This enum captures all unary and binary element-wise operations supported by the cuTENSOR library.
cutensorPlanAttribute_t
This enum lists all attributes of a cutensorPlan_t object that can be retrieved via cutensorPlanGetAttribute.
cutensorPlanPreferenceAttribute_t
This enum lists all attributes of a cutensorPlanPreference_t object that can be modified.
cutensorStatus_t
cuTENSOR status type returns
cutensorWorksizePreference_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_8XINT8
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§

cutensorBlockSparseContract
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}} $$
cutensorContract
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}} $$
cutensorContractTrinary
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}} $$
cutensorCreate
Initializes the cuTENSOR library and allocates the memory for the library context.
cutensorCreateBlockSparseContraction
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}$.
cutensorCreateBlockSparseTensorDescriptor
Create a block-sparse tensor descriptor.
cutensorCreateContraction
This function allocates a cutensorOperationDescriptor_t object that encodes a tensor contraction of the form $D = \alpha \mathcal{A} \mathcal{B} + \beta \mathcal{C}$.
cutensorCreateContractionTrinary
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}$.
cutensorCreateElementwiseBinary
This function creates an operation descriptor for an elementwise binary operation.
cutensorCreateElementwiseTrinary
This function creates an operation descriptor that encodes an elementwise trinary operation.
cutensorCreatePermutation
This function creates an operation descriptor for a tensor permutation.
cutensorCreatePlan
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.
cutensorCreatePlanPreference
Allocates the cutensorPlanPreference_t, enabling users to limit the applicable kernels for a given plan/operation.
cutensorCreateReduction
Creates a cutensorOperatorDescriptor_t object that encodes a tensor reduction of the form $D = alpha \* opReduce(opA(A)) + beta \* opC(C)$.
cutensorCreateTensorDescriptor
Creates a tensor descriptor.
cutensorDestroy
Frees all resources related to the provided library handle.
cutensorDestroyBlockSparseTensorDescriptor
Frees all resources related to the provided block-sparse tensor descriptor.
cutensorDestroyOperationDescriptor
Frees all resources related to the provided descriptor.
cutensorDestroyPlan
Frees all resources related to the provided plan.
cutensorDestroyPlanPreference
Frees all resources related to the provided preference.
cutensorDestroyTensorDescriptor
Frees all resources related to the provided tensor descriptor.
cutensorElementwiseBinaryExecute
Performs an element-wise tensor operation for two input tensors (see cutensorCreateElementwiseBinary)
cutensorElementwiseTrinaryExecute
Performs an element-wise tensor operation for three input tensors (see cutensorCreateElementwiseTrinary)
cutensorEstimateWorkspaceSize
Determines the required workspaceSize for the given operation encoded by desc.
cutensorGetCudartVersion
Returns version number of the CUDA runtime that cuTENSOR was compiled against.
cutensorGetErrorString
Returns the description string for an error code.
cutensorGetVersion
Returns Version number of the CUTENSOR library.
cutensorHandleReadPlanCacheFromFile
Reads a Plan-Cache from file and overwrites the cachelines of the provided handle.
cutensorHandleResizePlanCache
Resizes the plan cache.
cutensorHandleWritePlanCacheToFile
Writes the Plan-Cache (that belongs to the provided handle) to file.
cutensorLoggerForceDisable
This function disables logging for the entire run.
cutensorLoggerOpenFile
This function opens a logging output file in the given path.
cutensorLoggerSetCallback
This function sets the logging callback routine.
cutensorLoggerSetFile
This function sets the logging output file.
cutensorLoggerSetLevel
This function sets the value of the logging level.
cutensorLoggerSetMask
This function sets the value of the log mask.
cutensorMgContraction
Execute a contraction operation.
cutensorMgContractionFindSetAttribute
cutensorMgContractionGetWorkspace
Computes the workspace that is needed for the contraction.
cutensorMgCopy
Execute a copy operation.
cutensorMgCopyGetWorkspace
Computes the workspace that is needed for the copy.
cutensorMgCreate
Create a library handle.
cutensorMgCreateContractionDescriptor
Create a contraction descriptor.
cutensorMgCreateContractionFind
Create a contraction find.
cutensorMgCreateContractionPlan
Create a contraction plan.
cutensorMgCreateCopyDescriptor
Create a copy descriptor.
cutensorMgCreateCopyPlan
Create a copy plan.
cutensorMgCreateTensorDescriptor
Create a tensor descriptor.
cutensorMgDestroy
Destroy a library handle.
cutensorMgDestroyContractionDescriptor
Destroy a contraction descriptor.
cutensorMgDestroyContractionFind
Destroy a contraction find.
cutensorMgDestroyContractionPlan
Destroy a contraction plan.
cutensorMgDestroyCopyDescriptor
Destroy a copy descriptor and free all its previously-allocated resources.
cutensorMgDestroyCopyPlan
Destroy a copy plan.
cutensorMgDestroyTensorDescriptor
Destroy a tensor descriptor.
cutensorMpContract
Performs a distributed tensor contraction across multiple processes.
cutensorMpCreate
Initializes the cutensorMp library and creates a handle for distributed tensor operations.
cutensorMpCreateContraction
Creates an operation descriptor that encodes a distributed tensor contraction.
cutensorMpCreatePlan
Creates an execution plan for distributed tensor contractions.
cutensorMpCreatePlanPreference
Creates a plan preference object for controlling distributed tensor operation planning.
cutensorMpCreateTensorDescriptor
Creates a distributed tensor descriptor for multi-process tensor operations.
cutensorMpDestroy
Frees all resources associated with the provided cutensorMp handle.
cutensorMpDestroyOperationDescriptor
Frees all resources related to the provided distributed contraction descriptor.
cutensorMpDestroyPlan
Frees all resources related to the provided distributed contraction plan.
cutensorMpDestroyPlanPreference
Frees all resources related to the provided plan preference object.
cutensorMpDestroyTensorDescriptor
Frees all resources related to the provided distributed tensor descriptor.
cutensorMpPlanGetAttribute
Retrieves information about an already-created plan (see cutensorPlanAttribute_t).
cutensorOperationDescriptorGetAttribute
This function retrieves an attribute of the provided cutensorOperationDescriptor_t object (see cutensorOperationDescriptorAttribute_t).
cutensorOperationDescriptorSetAttribute
Set attribute of a cutensorOperationDescriptor_t object.
cutensorPermute
Performs the tensor permutation that is encoded by plan (see cutensorCreatePermutation).
cutensorPlanGetAttribute
Retrieves information about an already-created plan (see cutensorPlanAttribute_t)
cutensorPlanPreferenceGetAttribute
Get attribute of a cutensorPlanPreference_t object.
cutensorPlanPreferenceSetAttribute
Set attribute of a cutensorPlanPreference_t object.
cutensorReadKernelCacheFromFile
Reads a kernel cache from file and adds all non-existing JIT compiled kernels to the kernel cache.
cutensorReduce
Performs the tensor reduction that is encoded by plan (see cutensorCreateReduction).
cutensorWriteKernelCacheToFile
Writes the —per library— kernel cache to file.

Type Aliases§

FILE
_IO_lock_t
__off64_t
__off_t
__uint64_t
cutensorBlockSparseTensorDescriptor_t
Opaque structure representing a block-sparse tensor descriptor.
cutensorComputeDescriptor_t
Opaque structure representing a compute descriptor.
cutensorHandle_t
Opaque structure holding cuTENSOR’s library context.
cutensorLoggerCallback_t
A function pointer type for logging.
cutensorMgContractionDescriptor_t
Describes the contraction of two tensors into a third tensor with an optional source.
cutensorMgContractionFind_t
Describes the algorithmic details of implementing a tensor contraction.
cutensorMgContractionPlan_t
Describes a specific way to implement a contraction operation.
cutensorMgCopyDescriptor_t
Describes the copy of a tensor from one data layout to another.
cutensorMgCopyPlan_t
Describes a specific way to implement the copy operation.
cutensorMgHandle_t
Encodes the devices that participate in operations.
cutensorMgTensorDescriptor_t
Represents a tensor that may be distributed.
cutensorMpContractionDescriptor_t
cutensorMpContractionPlan_t
cutensorMpHandle_t
cutensorMpOperationDescriptor_t
cutensorMpPlanPreference_t
cutensorMpPlan_t
cutensorMpTensorDescriptor_t
cutensorOperationDescriptor_t
Opaque structure representing any type of problem descriptor (e.g., contraction, reduction, elementwise).
cutensorPlanPreference_t
Opaque structure that narrows down the space of applicable algorithms/variants/kernels.
cutensorPlan_t
Opaque structure representing a plan (e.g, contraction, reduction, elementwise).
cutensorTensorDescriptor_t
Opaque structure representing a tensor descriptor.
size_t