Skip to main content

Module contract

Module contract 

Source
Expand description

ContractRequest<T> — dtype-generic Einstein-summation contraction.

D = alpha * A^modes_a · B^modes_b + beta * C^modes_c (D in-place into the C buffer). Mirrors the cuTENSOR cutensorContract entry point.

Structs§

ContractRequest
Dtype-generic contraction request.
OperandSpec
One operand specification: device buffer + per-mode extents + optional strides + Einstein-summation labels.

Functions§

build_contract_key
Build a cache key from raw mode/extent slices. Tests that don’t need a live GpuRef use this directly; the dispatch path goes through [build_key_for].
default_compute_for
Pick the canonical compute descriptor for T. Mirrors NVIDIA’s guidance: f32 inputs default to MIN_32F, f64 to MIN_64F, half/bf16 accumulate in f32 (MIN_32F).