GitHub Repo
PyTorch Community Reports Inductor Numerical Error That May Affect Non-Contiguous BF16 Inputs with INT8 Weights
On November 13, the PyTorch community reported that a specific linear layer can produce incorrect results on non-contiguous BF16 inputs after compilation with `torch.compile`. The report includes a minimal CUDA reproduction, but the root cause, affected versions, and a fix remain unconfirmed.

On November 13, the PyTorch community filed an Inductor correctness report: on CUDA, converting INT8 weights to BF16 before a linear operation may produce incorrect numerical results when a non-contiguous BF16 input is compiled with torch.compile. Running the same code directly produces the expected result. The issue remains open, with no linked fix proposal so far. Issue and reproduction
The author uses a rectangular identity matrix as the weights and an all-ones vector as the scaling factor, so the correct answer is simply the input’s first 64 features. This reduces the chance of ambiguity caused by the model itself. In the reported RTX A6000, PyTorch 2.14.1, and CUDA 12.6 environment, 8,188 of 8,704 elements in the compiled result differed from the expected values, with a maximum absolute error of 16. The input contained only integers that BF16 can represent exactly. These figures come from the reporter and have not been verified across hardware. Test conditions and output
This case is worth attention from inference engineers because ordinary dimension transposes can produce non-contiguous tensors. The official documentation explains that a view created by transpose() shares the underlying data and changes only how it is interpreted; it does not move the data, and may therefore have a non-contiguous layout. In practice, tests that use only contiguous inputs may miss layout combinations in real data pipelines. Tensor Views documentation
Teams using similar weight-conversion workflows can prioritize adding transposed inputs, comparing eager and compiled results layer by layer, and recording shapes, strides, data types, and software and hardware versions. The documentation notes that .contiguous() copies data when necessary. It can be used as a test variable to isolate layout effects, but this report has not shown that it avoids the issue, and the extra copy has a cost. Layout and copying behavior
The current evidence is limited to one minimal case and does not establish that all INT8-quantized models are affected. Follow-up should track whether maintainers confirm the root cause, add a regression test, and specify which versions a fix covers. The issue’s automated classification labels and community survey interest do not amount to official confirmation of the scope of impact. Issue status