.. meta::
   :description: TorchNeuron API reference. torch.neuron device module and torch.accelerator support, supported PyTorch APIs and operators, operator compatibility table, and torch.compile reference for TorchNeuron on AWS Neuron.
   :keywords: TorchNeuron, torch-neuronx, AWS Neuron, Trainium, API, reference, compatibility
   :date-modified: 2026-11-02

.. _torchneuron-api-reference:

============================
TorchNeuron API reference
============================

API reference material for TorchNeuron on AWS Neuron.

.. grid:: 1
   :gutter: 2

   .. grid-item-card::
      :link: torchneuron-torch-neuron-module-ref
      :link-type: ref
      :class-card: sd-border-2

      **torch.neuron and torch.accelerator reference**
      ^^^
      Device, random number generation, stream, event, memory, and
      compilation-metrics functions of the ``torch.neuron`` module, and the
      ``torch.accelerator`` functions that TorchNeuron supports.

   .. grid-item-card::
      :link: torchneuron-supported-operators
      :link-type: ref
      :class-card: sd-border-2

      **Supported PyTorch APIs and operators**
      ^^^
      How the ``torch-neuronx`` compatibility table classifies each API, support
      counts by namespace, fallback behavior in eager mode and ``torch.compile``,
      and how to find the operators that run on CPU in your model.

   .. grid-item-card::
      :link: https://github.com/aws-neuron/torch-neuronx/blob/main/docs/torch_api_compatibility.md
      :link-type: url
      :class-card: sd-border-2

      **Operator compatibility table**
      ^^^
      Per-API support status, dtype coverage, and CPU fallbacks for
      TorchNeuron, maintained in the ``torch-neuronx`` repository.

   .. grid-item-card::
      :link: /torch/compile/reference-torch-compile
      :link-type: doc
      :class-card: sd-border-2

      **torch.compile backend reference**
      ^^^
      ``torch.compile`` parameter and ``torch.compiler`` API support, graph
      breaks, environment variables, and caching.


.. toctree::
   :maxdepth: 1
   :hidden:

   torch-neuron-module
   supported-operators
   Operator compatibility table <https://github.com/aws-neuron/torch-neuronx/blob/main/docs/torch_api_compatibility.md>
