TorchLean API

NN.Runtime.Autograd.IRExec.Lowering.Basic

Basic and Random IR Lowering #

Checked lowering for graph inputs, constants, detachment, and random operations.

Each operation has its own small lower* definition. lowerBasic only dispatches on the operation kind, and the lowerBasic_* equation lemmas let correctness proofs reduce a dispatch to the branch they care about without unfolding the whole dispatcher.

A second .input node cannot appear after node 0; the lowering loop rejects it.

Instances For

    Checked lowering for .const s: read the payload tensor and retag it at the declared shape.

    Instances For

      Checked lowering for .detach, including scalar tangent removal for dual-valued execution.

      Instances For

        Checked lowering for .randUniform seed: a deterministic tensor keyed by seed and node id.

        Instances For

          Checked lowering for .bernoulliMask seed: a keyed mask with a scalar keep probability.

          Instances For

            Checked lowering for graph inputs, constants, detachment, and random operations.

            Instances For
              @[simp]

              Dispatch equation for .const s.

              @[simp]

              Dispatch equation for .randUniform seed.

              @[simp]

              Dispatch equation for .bernoulliMask seed.