.. _error-code-exsp001:

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

NCC_EXSP001
===========

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

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 activations across more NeuronCores with tensor parallelism. With TorchNeuron,
   use DTensor and the tensor-parallel styles of ``torch.distributed`` on the ``neuron``
   backend.
3. For training at scale, use :ref:`TorchTitan Neuron <torchtitan-neuron-landing>`. 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>`
