Reference and Portable Backend Capsules #
Portable capsules for paths that do not require CUDA or LibTorch.
These are not meant to win benchmarks. They keep TorchLean runnable on CPU-only machines and give the planner a clear fallback vocabulary for reference/spec-aligned execution.
Build a checked portable CPU capsule with explicit value, VJP, shape, and layout contracts.
Instances For
Build the standard portable capsule for a pointwise operation.
Instances For
Build a portable reduction capsule with deterministic left-to-right accumulation.
Instances For
Reference kernel whose scalar result contains an explicit left-to-right accumulation.
Matrix products, affine layers, convolutions, and averaging operations all reduce several products or samples into one output entry. Keeping this constructor separate from pointwise kernels prevents the numerical audit from incorrectly reporting that reduction order is irrelevant.
Instances For
Build the standard portable capsule for a shape or layout transformation.
Instances For
Build a portable forward-only capsule with no registered reverse derivative.
Instances For
Build a portable capsule for channel-first convolution or pooling.
Instances For
Reference window selection with deterministic traversal and tie handling.
Instances For
Reference pointwise hyperbolic tangent.
Instances For
Reference pointwise natural logarithm.
Instances For
Reference guarded logarithm used by numerically defensive programs.
Instances For
Reference log-softmax reduction and normalization.
Instances For
Reference hard-masked softmax with exact zero weight at blocked coordinates.
Instances For
Reference arithmetic-mean reduction.
Instances For
Reference shape-preserving reshape view.
Instances For
Reference seeded uniform-random tensor generation.
Instances For
Reference seeded Bernoulli-mask generation.
Instances For
Reference mean-squared-error loss.
Instances For
Reference generic channel-first convolution.
Instances For
Reference generic channel-first transpose convolution.
Instances For
Reference smooth max pooling.
Instances For
Reference attention path using the composed TorchLean expression.
Instances For
Cross-platform reference capsules.