This document is relevant for: Inf2, Trn1, Trn2, Trn3
NCC_EVRF007#
Error message: The number of instructions generated exceeds the limit.
The graph is too large for the compiler to compile as one unit. To fix this issue, make the graph that each NeuronCore compiles smaller:
Partition the model. With TorchNeuron, shard the model with tensor parallelism (DTensor) or pipeline parallelism on the
neuronbackend. Each rank then compiles a smaller graph. See How to use torch.distributed on Neuron and Pipeline parallelism: split layers across stages.Use a framework that partitions for you. For training at scale, use TorchTitan Neuron. For inference, use the tensor parallelism of vLLM Neuron.
Fuse operations into a kernel. Replace a large group of operations with an NKI kernel. See NKI.
For more information:
This document is relevant for: Inf2, Trn1, Trn2, Trn3