Skip to main content

Module cutensor

Module cutensor 

Source
Expand description

Local sys-level wrappers around cudarc::cutensor::sys for the cuTENSOR entry points the safe cudarc::cutensor::result module does not expose (Reduce/ElementwiseBinary/ElementwiseTrinary create+execute, Permutation create+execute, predefined compute descriptors).

Every function here is unsafe and takes the raw cuTENSOR enum types from cudarc::cutensor::sys. The entire crate’s actor layer drives these through kernel/tensor/.

All wrappers convert cutensorStatus_t into a thin CutensorError that mirrors what cudarc::cutensor::result emits; callers that already use cudarc::cutensor::result can interleave both freely.

Structs§

CutensorError
Error wrapper around a cutensorStatus_t. Mirrors cudarc::cutensor::result::CutensorError so error messages are consistent across the safe/sys boundary.

Functions§

c_32f
create_elementwise_binary
Create a binary elementwise operation descriptor. Wraps cutensorCreateElementwiseBinary.
create_elementwise_trinary
Create a trinary elementwise operation descriptor. Wraps cutensorCreateElementwiseTrinary.
create_permutation
Create a permutation operation descriptor. Wraps cutensorCreatePermutation.
elementwise_binary_execute
Execute a previously-planned binary elementwise op.
elementwise_trinary_execute
Execute a previously-planned trinary elementwise op.
permute
Execute a previously-planned permutation.
plan_preference_set_algo
Set the pinned algorithm on a plan-preference object. Used by the contraction autotune to probe a specific cutensorAlgo_t value.
r_32f
r_64f
r_min_16bf
r_min_16f
r_min_32f
r_min_64f
r_min_tf32
reduce
Wraps cutensorReduce (post-plan execution).