Describe the bug
Our checkpoint ships natively in FP8 with 128x128 blockwise scales. We keep the
expert weights in torch.float8_e4m3fn purely as storage and dequantise them to
BF16 inside forward, so the hardware never sees an e4m3 operand. The compiler
rejects the tensor regardless:
[ERROR] [NCC_EVRF051] Data type F8E4M3FN is not supported on TRN1/TRN2.
Target TRN3 or later hardware
For a 313B-parameter MoE this is the difference between 19.03 GB and 9.51 GB of
expert weight per rank, which in turn decides how much context and batch fit.
What we are missing is what to do instead:
- Is there an FP8 storage dtype that is accepted in a graph on TRN2?
- If not, is
uint8 storage plus a 256-entry lookup table the intended pattern?
That is exact, since e4m3 has exactly 256 values, but it materialises BF16 on the
read, so it saves resident HBM rather than bandwidth.
torch._scaled_mm does compile on TRN2 and NeuronCore-v3 does e4m3 arithmetic.
Is a true FP8 GEMM the only supported route to FP8 weights on this hardware?
Model Name
GLM-5.3-Flash (glm5_next), 313B parameters, 288 routed experts, FP8 checkpoint
with 128x128 blockwise scales.
Describe the workload type
Inference. Tensor parallel 32, expert parallel 32. The FP8 tensors are expert
weights only, held as storage and dequantised per layer inside forward.
Instance Type
trn2.48xlarge, logical-neuroncore-config: 2
Release version
neuronx-cc 2.27.5334.0+f702b353
aws-neuronx-runtime-lib 2.34.10.0-ac18d186d
aws-neuronx-dkms 2.30.2.0
torch 2.11.0
torch-xla 2.11.0
Reproduction Steps
Any graph containing an f8e4m3fn tensor reproduces it. Minimally:
import torch, torch_xla.core.xla_model as xm
dev = xm.xla_device()
w8 = torch.zeros(256, 256, dtype=torch.float8_e4m3fn, device=dev)
scale = torch.ones(2, 2, device=dev)
# dequantise before any arithmetic: the FP8 value is never an operand to a matmul
w = (w8.to(torch.float32) * scale.repeat_interleave(128, 0).repeat_interleave(128, 1))
x = torch.randn(8, 256, device=dev)
y = x @ w.to(torch.bfloat16).t()
xm.mark_step()
print(y.sum().cpu())
Expected: compiles, since no e4m3 operand ever reaches the hardware.
Actual: NCC_EVRF051.
Regression Issue
Possible Solution
If f8e4m3fn cannot be permitted as an inert storage dtype, documenting the intended
alternative would be enough. "The checkpoint is FP8, so keep it FP8" is the obvious
first thing to try with any recent MoE checkpoint, and there is currently nothing
pointing to the supported path.
Logs/Context/Additional Information
We fell back to BF16 storage at 19.59 GB/rank, which does fit on one trn2.48xlarge,
so this is not blocking us. It cost us the headroom we had planned to spend on
longer context and larger batches.
Describe the bug
Our checkpoint ships natively in FP8 with 128x128 blockwise scales. We keep the
expert weights in
torch.float8_e4m3fnpurely as storage and dequantise them toBF16 inside
forward, so the hardware never sees an e4m3 operand. The compilerrejects the tensor regardless:
For a 313B-parameter MoE this is the difference between 19.03 GB and 9.51 GB of
expert weight per rank, which in turn decides how much context and batch fit.
What we are missing is what to do instead:
uint8storage plus a 256-entry lookup table the intended pattern?That is exact, since e4m3 has exactly 256 values, but it materialises BF16 on the
read, so it saves resident HBM rather than bandwidth.
torch._scaled_mmdoes compile on TRN2 and NeuronCore-v3 does e4m3 arithmetic.Is a true FP8 GEMM the only supported route to FP8 weights on this hardware?
Model Name
GLM-5.3-Flash (
glm5_next), 313B parameters, 288 routed experts, FP8 checkpointwith 128x128 blockwise scales.
Describe the workload type
Inference. Tensor parallel 32, expert parallel 32. The FP8 tensors are expert
weights only, held as storage and dequantised per layer inside forward.
Instance Type
trn2.48xlarge,logical-neuroncore-config: 2Release version
Reproduction Steps
Any graph containing an
f8e4m3fntensor reproduces it. Minimally:Expected: compiles, since no e4m3 operand ever reaches the hardware.
Actual:
NCC_EVRF051.Regression Issue
Possible Solution
If f8e4m3fn cannot be permitted as an inert storage dtype, documenting the intended
alternative would be enough. "The checkpoint is FP8, so keep it FP8" is the obvious
first thing to try with any recent MoE checkpoint, and there is currently nothing
pointing to the supported path.
Logs/Context/Additional Information
We fell back to BF16 storage at 19.59 GB/rank, which does fit on one trn2.48xlarge,
so this is not blocking us. It cost us the headroom we had planned to spend on
longer context and larger batches.