.. _error-code-eoom001:

.. meta::
   :description: AWS Neuron SDK Graph Compiler error code documentation for error EOOM001. The model tensors need more high-bandwidth memory (HBM) than the NeuronCore has.
   :keywords: neuronx-cc, EOOM001, NCC_EOOM001, out of memory, HBM, tensor parallelism, DTensor, FSDP2, TorchNeuron, TorchTitan Neuron
   :date-modified: 2026-11-16

NCC_EOOM001
===========

**Error message**: The combined memory needed for the model tensors exceeds the high-bandwidth memory limit.

The memory usage consists of:

- I/O tensors: Input and output activation tensors
- Internal allocations: Scratchpad memory for intermediate computations
- SBUF spills: Data that cannot fit in on-chip SBUF memory and must spill to HBM

To fix this issue, do one or more of these steps:

1. Decrease the batch size or the sequence length, if possible.
2. Shard the model across more NeuronCores. With TorchNeuron, use the standard
   ``torch.distributed`` APIs on the ``neuron`` backend: tensor parallelism with DTensor,
   or FSDP2 to shard parameters, gradients, and optimizer state.
3. For training at scale, use :ref:`TorchTitan Neuron <torchtitan-neuron-landing>`, which
   combines these parallelism strategies. For inference, use the tensor parallelism of
   :ref:`vLLM Neuron <vllm-neuron-home>`.

This example shards two linear layers with tensor parallelism on the ``neuron`` backend:

.. code-block:: python

   from torch.distributed.device_mesh import init_device_mesh
   from torch.distributed.tensor.parallel import (
       ColwiseParallel, RowwiseParallel, parallelize_module,
   )

   tp_mesh = init_device_mesh("neuron", (world_size,), mesh_dim_names=("tp",))
   model = torch.nn.Sequential(
       torch.nn.Linear(16, 32), torch.nn.ReLU(), torch.nn.Linear(32, 16),
   ).to("neuron")
   model = parallelize_module(
       model, tp_mesh, {"0": ColwiseParallel(), "2": RowwiseParallel()},
   )

For more information:

- :ref:`torchneuron-torch-distributed-guide`
- :ref:`TorchTitan Neuron <torchtitan-neuron-landing>`
- :doc:`vLLM Neuron tensor parallelism </vllm-neuron/docs/design/parallelism/tensor_parallelism>`
