This document is relevant for: Inf2, Trn1, Trn2, Trn3

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:

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:

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 Neuron Compiler CLI Reference Guide (neuronx-cc).

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:

This document is relevant for: Inf2, Trn1, Trn2, Trn3