TorchLean API

NN.Backend.Target

Backend Targets #

Cross-platform target descriptions for backend planning.

ExecutionConfig says what a run wants. Availability says which devices and providers a planner may consider. Target describes declared platform/build capabilities: CPU-only Linux, CUDA Linux, Apple Metal, TPU/XLA, AWS Trainium/Neuron, WASM, or a caller-supplied accelerator all map into the same capsule planner. A target declaration is not runtime discovery; executable paths must still probe the linked runtime before launching work.

Operating-system family relevant to backend packaging and dynamic-library loading.

Instances For

    Machine architecture relevant to native extension availability.

    Instances For

      Primary accelerator family for a build or machine.

      Instances For
        @[implicit_reducible]

        Optional backend feature compiled into or discoverable from a build.

        Instances For

          Platform/build description used to produce backend availability.

          Instances For
            @[implicit_reducible]

            Provider exposed by a build feature, if it corresponds to one.

            Instances For

              Device exposed by an accelerator target. CPU is added separately by Target.devices.

              Instances For

                Device set exposed by the target. CPU/reference remains available unless a caller filters it.

                Instances For

                  Providers exposed by the target and its compiled/discovered features.

                  Instances For

                    Convert a target declaration to planner capabilities; this does not probe the current machine.

                    Instances For

                      Portable CPU/reference target.

                      Instances For

                        Linux CPU/reference target.

                        Instances For

                          macOS CPU/reference target.

                          Instances For

                            Windows CPU/reference target.

                            Instances For
                              def NN.Backend.Target.linuxCuda (enableLibTorch : Bool := false) :

                              Linux CUDA target with native CUDA provider features.

                              Instances For
                                def NN.Backend.Target.windowsCuda (enableLibTorch : Bool := false) :

                                Windows CUDA target shape. Native support depends on the future Windows build/test pass.

                                Instances For

                                  Linux ROCm target shape for future AMD/HIP capsules.

                                  Instances For

                                    macOS target for future Metal/MPS capsules.

                                    Instances For

                                      WASM target for browser or WASI-style execution.

                                      Instances For

                                        TPU/XLA target shape for future accelerator capsules.

                                        Instances For

                                          AWS Trainium/Neuron target shape for future accelerator capsules.

                                          Instances For

                                            Target shape for a first-party or lab-specific accelerator with its own capsule provider.

                                            Instances For

                                              Target shape for a caller-supplied accelerator provider.

                                              Instances For