This document is relevant for: Inf2, Trn1, Trn2, Trn3
Neuron Compiler Error Codes#
This page lists the error codes you can encounter while developing with the Neuron Compiler. For more details on any individual error, click the link for that error code in the table below.
Error Code |
Error Message |
Recommendation |
|---|---|---|
Unsupported Logical Neuron Core (LNC) configuration. |
You attempted to use a Logical Neuron Core configuration that is not supported by the target Neuron architecture. |
|
MLP kernel intermediate size exceeds the maximum supported value of 4096. |
Consider tiling large intermediate tensors in your kernel to stay within the supported limit, or increase tensor parallelism to shard the intermediate dimension across more cores. |
|
The number of instructions generated exceeds the limit. |
Consider applying model parallelism as partitioning the model will help break large computational graphs into smaller subgraphs. |
|
The compiler encountered a custom call instruction with a target name that is not recognized. |
Use a supported custom call target from the list of recognized targets. |
|
Dynamic shape is not supported. The Neuron compiler requires all tensor dimensions to be statically sized. |
Recompile the model with fully static input shapes. When compiling via PyTorch torch.compile, set dynamic=False to disable dynamic shape specialization. |
|
The combined memory needed for the model’s activation tensors exceeds the high-bandwidth memory limit. |
You may need to reduce batch/tensor size or utilize pipeline/tensor parallelism via neuronx-distributed. |
|
The combined memory needed for the model’s activation tensors exceeds the high-bandwidth memory limit. |
You may need to reduce batch/tensor size or utilize pipeline/tensor parallelism via neuronx-distributed. |
|
The compiler encountered a unsigned 64-bit integer constant with a value that cannot be safely converted to 32-bit representation. |
Try to use uint32 for constants when possible and restructure code to avoid large constants. |
|
The compiler encountered a data type that is not supported for code generation. |
Use a supported data type as listed in the Neuron documentation. |
|
Unsupported 8-bit floating-point data type. |
The compiler found usage of an unsupported 8-bit floating-point data type. Convert to a supported type like torch.float16. |
|
An unsupported operator was used. |
Try using alternative operators from the full list of supported operators via neuronx-cc list-operators –framework XLA to workaround the limitation. |
|
An unsupported operator was used. |
Try using alternative operators from the full list of supported operators to workaround the limitation. |
|
Complex data types are not supported on the Neuron device. |
You cannot use complex data types (such as |
|
Unsupported F8E4M3FNUZ, F8E4M3B11FNUZ, or F8E5M2FNUZ data type. |
The compiler found usage of unsupported 8-bit floating-point data types. Convert to a supported type like torch.float16. |
|
The compiler encountered a RNGBitGenerator operation using a random number generation algorithm other than RNG_DEFAULT. |
Ensure that you are using standard JAX/PyTorch random APIs and not explicitly specifying an RNG algorithm. |
|
The number of instructions generated exceeds the limit. |
Consider applying model parallelism as partitioning the model will help break large computational graphs into smaller subgraphs. |
|
The combined memory needed for the model’s activation tensors exceeds the high-bandwidth memory limit. |
You may need to reduce batch/tensor size or utilize pipeline/tensor parallelism via neuronx-distributed. |
|
The compiler encountered simultaneous use of input and kernel dilation, which is not supported. |
If possible, use only input or kernel dilation, not both simultaneously. |
|
The compiler encountered strided convolution combined with dilated input, which is not supported. |
If possible, remove stride or input dilation, or apply upsampling and downsampling separately. |
|
TopK does not support integer input tensors (int32, int64). |
The TopK operation cannot be performed on integer data types. |
|
The compiler encountered a custom call instruction with a target name that is not recognized. |
Use a supported custom call target from the list of recognized targets. |
|
The scatter-reduce operation cannot perform reduction logic if the data being scattered or the destination tensor is using an integer or boolean data type. |
Cast your input and source tensors to a floating-point data type (e.g., torch.float32 or torch.bfloat16). |
|
Reduce-window operation with base dilation greater than 1 is not supported. |
Change base dilation to be all 1s or consider manual dilation if necessary. |
|
Reduce-window operation with window dilation greater than 1 is not supported. |
Remove window_dilation or change values to be all 1s, or consider manual dilation if necessary. |
|
The compiler encountered a reduce-window operation with more or less than 2 operands. |
If possible, split multi-operand reduce_window with multiple single-operand reduce_window operations. |
|
Shift-right-arithmetic operation on non 32-bit inputs is not supported. Cast the first argument’s data type to be S32, U32, or F32. |
You need to use 32-bit data types for shift operations. Cast inputs to int32, uint32, or float32. |
|
The compiler encountered a scatter out-of-bounds error. |
Ensure that the iota size matches the operand dimension size. |
|
QuantizeMX custom call has invalid backend_config JSON. |
Provide a valid JSON object in backend_config. |
|
QuantizeMX custom call operand count must be exactly 1 (input tensor). |
Pass exactly one input tensor as the operand to QuantizeMX. |
|
QuantizeMX custom call dim is invalid for input tensor rank. |
Use the last dimension, or the second-to-last dimension for inputs with rank 2 or greater. |
|
QuantizeMX custom call block_size must be 32. |
Use block_size=32 as required by the OCP MXFP specification. |
|
QuantizeMX custom call scale_method is unsupported. |
Use “EMAX”, the only supported scale method. |
|
QuantizeMX custom call input type is unsupported. |
Cast input tensor to BF16 or F16 before quantization. |
|
QuantizeMX custom call is malformed. |
Use a supported logical FP8 dtype and a correctly shaped, U32-packed quantized_data output. |
|
ScaledMatmul custom call must have exactly 4 operands. |
Pass all 4 operands: lhs, rhs, lhs_scale, rhs_scale. |
|
ScaledMatmul custom call LHS input type is unsupported. |
Use the packed U32 quantized data tensor returned by QuantizeMX. |
|
ScaledMatmul custom call output type is unsupported. |
Declare the result as F32 or BF16. |
|
ScaledMatmul custom call LHS tensor must have rank >= 2. |
Reshape the LHS to have at least 2 dimensions. |
|
ScaledMatmul custom call RHS tensor must have rank >= 2. |
Reshape the RHS to have at least 2 dimensions. |
|
ScaledMatmul custom call batch dimension mismatch. |
Ensure the product of LHS and RHS batch dimension sizes match. |
|
ScaledMatmul custom call could not parse backend_config. |
Provide valid JSON with integer values in each dimension array. |
|
ScaledMatmul custom call contracting dimension sizes mismatch. |
Ensure LHS and RHS contracting dimensions have equal size. |
|
Data type F8E4M3FN is not supported on TRN1/TRN2. |
For QuantizeMX, target Trn3 or later without the F8E4M3 conversion flag. |
|
Data type F8E4M3 is not supported on hardware newer than Trn3. |
Use F8E4M3FN instead of F8E4M3. |
|
ScaledMatmul custom call contracting dimension overlaps with batch dimension. |
Ensure batch dimensions and contracting dimensions are disjoint. |
|
ScaledMatmul custom call batch dimension index out of bounds. |
Use dimension indices within valid range (0 <= dim < rank). |
|
ScaledMatmul custom call contracting dimension index out of bounds. |
Use dimension indices within valid range (0 <= dim < rank). |
|
Operation gather encountered out of bound indices. |
Ensure that the iota dimension size is less than or equal to the size of the corresponding operand dimension. Check that your model’s max_position_embeddings is >= sequence_length. |
|
QuantizeMX custom call must return a tuple with exactly 2 outputs. |
Declare a 2-element tuple result type (quantized_data, scale). |
|
QuantizeMX custom call input dimension must be divisible by 4. |
Pad or reshape the input so the quantization dimension size is a multiple of 4. |
|
Kernel file referenced by AwsNeuronCustomNativeKernel instruction does not exist on the host. |
Ensure the NKI kernel artifact file exists at the specified path before compilation. Clear the NKI file cache and retrace the model, or copy artifacts into the compiler launch directory. |
|
The combined memory needed for the model’s activation tensors exceeds the high-bandwidth memory limit. |
You may need to reduce batch/tensor size or utilize pipeline/tensor parallelism via neuronx-distributed. |
|
The number of instructions generated exceeds the limit. |
Consider applying model parallelism as partitioning the model will help break large computational graphs into smaller subgraphs. |
This document is relevant for: Inf2, Trn1, Trn2, Trn3