TorchLean API

NN.Examples.DeepDives.IRAxisOps

IR axis operations #

IR axis-ops runtime tutorial.

This example is a small regression guard for three ops where TorchLean’s IR uses an explicit axis:

Why this tutorial exists:

Run:

lake exe torchlean ir_axis_ops --dtype float --backend eager

Command-line help for the IR axis-ops tutorial.

Instances For

    Test Shapes #

    We keep shapes compact while still exercising the “axis is not last / not 0” code paths.

    Small IR Graphs #

    Runner Helpers #

    def NN.Examples.DeepDives.IRAxisOps.runOne {α : Type} [Context α] [DecidableEq Spec.Shape] [ToString α] [TorchLean.Runtime.FromFloat α] (tag : String) (g : IR.Graph) (payload : IR.Payload α) (inputShape : Spec.Shape) (x : Spec.Tensor α inputShape) (outputId : Fin g.nodes.size) (forwardArtifact : Bool := true) :
    Instances For

      Runtime-selected entrypoint body for the axis-ops tutorial.

      Instances For