TorchLean API

NN.Backend.Profile

Backend Profiles #

Named backend profiles bundle the choices that should move together: build availability, kernel-selection policy, and the ordered capsule modules. This gives downstream APIs one object to pass around instead of separately threading device availability, provider preference, and permission to accept trusted-boundary evidence.

A named kernel-selection profile for one device.

  • name : String

    Human-readable profile name used in diagnostics and reports.

  • policy : KernelPolicy

    Device, provider preference, assurance policy, and VJP ownership.

  • availability : Availability

    Devices and providers the build declares available to planning.

  • capsuleModules : Array Registry.CapsuleModule

    Capsule modules used to construct and validate the profile's planning registry.

Instances For

    Extend a profile with operation/provider capsule modules without changing model semantics, availability, or assurance policy.

    A new contribution replaces an existing module with the same name. Duplicate names within modules are still rejected when the profile is planned.

    Instances For

      Capsule registry selected by the profile.

      Instances For

        Select capsules using the profile registry, availability, and kernel policy.

        Instances For

          Select a capsule for every runtime-relevant IR node.

          Instances For

            Plan, group, and contract-check a graph under the profile.

            Instances For

              Maintained portable CPU/reference profile with runtime guards and regression evidence.

              Instances For

                Strict LibTorch CUDA profile with TorchLean tape traversal and selected local VJPs.

                Only capsules with retained regression evidence and runtime guards are admitted. Operations whose dedicated CUDA checks were removed require libTorchCuda or an explicit external policy. No LibTorch autograd graph is recorded.

                Instances For

                  Default GPU profile, admitting explicitly recorded LibTorch implementation assumptions.

                  Runtime guards still check the bridge. Numerical comparisons are named only for operations covered by the retained suite; the other capsules declare their external trust boundary. Use checkedCuda to reject those untested operations instead.

                  Instances For

                    Maintained execution profile for a device, when TorchLean currently provides one.

                    Other named devices remain expressible through caller-supplied profiles. They are not silently converted into profiles with empty registries.

                    Instances For

                      Whether this profile registers at least one capsule for its selected device.

                      Instances For