Skip to main content

Module binary_param

Module binary_param 

Source
Expand description

Parameterized binary elementwise plan.

Sibling of crate::BinaryPlan for ops that carry a scalar parameter alongside their two tensor inputs. Today wired: Lerp (y = a + weight·(b - a); weight = param) across {f32, f16, bf16, f64} — FW only here, the BW lives in crate::BinaryParamBackwardPlan.

Single-scalar-param shape (one f32 field, not the unary’s [f32; 2]) — binary ops in this family take exactly one broadcast scalar per the PyTorch / JAX lerp(a, b, w) precedent. Future single-param binary ops (none today) would extend the dispatcher’s match arms.

Trailblazer constraints: contig-only (no strided variant); a.shape == b.shape == y.shape == desc.shape. No broadcasting.

Structs§

BinaryParamArgs
Args bundle for a parameterized binary elementwise launch.
BinaryParamDescriptor
Descriptor for a parameterized binary elementwise op.
BinaryParamPlan
Parameterized binary elementwise plan.