.. _error-code-earg001:

.. meta::
   :description: AWS Neuron SDK Graph Compiler error code documentation for error EARG001. The Logical NeuronCore (LNC) configuration is not supported on the target Neuron architecture.
   :keywords: neuronx-cc, EARG001, NCC_EARG001, LNC, logical NeuronCore, NEURON_LOGICAL_NC_CONFIG, --logical-nc-config, TorchNeuron, Trn2, Trn3
   :date-modified: 2026-11-16

NCC_EARG001
===========

**Error message**: This error occurs when you attempt to use a Logical Neuron Core (LNC) configuration that is not supported by the target Neuron architecture.

The supported LNC values depend on the target:

- **Trn2 and Trn3:** LNC can be ``1`` or ``2``. The default is ``2``.
- **Trn1 and Inf2:** only LNC ``1`` is supported.

For example, this command causes the error, because it sets LNC ``2`` for a ``trn1`` target:

.. code-block:: shell

   neuronx-cc compile model.hlo --framework XLA --target trn1 --logical-nc-config 2  # ERROR: LNC 2 is not supported on trn1

To fix the error, set an LNC value that the target supports. With TorchNeuron, set the
``NEURON_LOGICAL_NC_CONFIG`` environment variable before you start the program. This example
uses LNC ``2`` on Trn2, which is also the default:

.. code-block:: shell

   export NEURON_LOGICAL_NC_CONFIG=2
   python train.py   # uses torch.compile(model, backend="neuron")

When you call ``neuronx-cc`` directly, use the ``--logical-nc-config`` option (short form
``--lnc``). See :ref:`neuron-compiler-cli-reference-guide`.

Physical Neuron Core:

- Actual hardware compute unit on the chip

- Has dedicated compute resources, memory, etc.

Logical Neuron Core:

- Software abstraction grouping multiple physical cores

- Controlled with the ``NEURON_LOGICAL_NC_CONFIG`` environment variable, or with the ``--logical-nc-config`` option when you use ``neuronx-cc`` directly

For more information:

- :ref:`neuron-device-memory-deep-dive`
- :ref:`torchneuron-env-vars`
