Expand description
TensorActor — wraps cuTENSOR for contractions, reductions,
permutations, and binary/trinary elementwise ops.
cuTENSOR’s safe cudarc::cutensor::result layer covers
contractions and reductions only. The remaining ops drop down to
cudarc::cutensor::sys via the local
crate::sys::cutensor wrappers.
The actor is a single mailbox carrying TensorMsg::Op(Box<dyn TensorDispatch>). Each typed request — ContractRequest<T>,
ReductionRequest<T>, ElementwiseBinaryRequest<T>,
ElementwiseTrinaryRequest<T>, PermutationRequest<T> — implements
TensorDispatch so it
erases through a single mailbox without mailbox-per-dtype blowup.
Re-exports§
pub use compute_desc::ComputeDesc;pub use contract::ContractRequest;pub use contract::OperandSpec;pub use elementwise::ElementwiseBinaryRequest;pub use elementwise::ElementwiseTrinaryRequest;pub use permute::PermutationRequest;pub use plan_cache::PlanCache;pub use plan_cache::PlanKey;pub use plan_cache::DEFAULT_PLAN_CACHE_SIZE;pub use reduce::ReductionRequest;
Modules§
- compute_
desc - Mixed-precision compute descriptors used by every cuTENSOR op.
- contract
ContractRequest<T>— dtype-generic Einstein-summation contraction.- elementwise
ElementwiseBinaryRequest<T>andElementwiseTrinaryRequest<T>.- permute
PermutationRequest<T>— dtype-generic mode permutation.- plan_
cache - LRU plan cache for cuTENSOR operations.
- reduce
ReductionRequest<T>— dtype-generic tensor reduction.
Structs§
- Send
Handle - Newtype around
cutensorHandle_tso it can be stored inArc<Mutex>. ManuallySend/Syncbecause the wrapped pointer is opaque and cuTENSOR’s docs guarantee thread-safety of the handle when callers serialise access (theMutexdoes that). - Tensor
Actor
Enums§
- Tensor
Msg TensorActormailbox. New requests should useTensorMsg::Opwith aBox<dyn TensorDispatch>— theContractvariant is kept as a deprecated thin alias for back-compat with the F-phase API.
Type Aliases§
- Tensor
Spec - Pre-Phase-2 spec: alias of
OperandSpec<f32>so existing call sites (tests/contract_e2e.rs, downstream users) keep compiling. New code should preferOperandSpec<T>directly.