Repository navigation
Commit 65aacaa
authored
NXP backend: remove pytorch#22179 workaround for QAT channels-last segfault (pytorch#22746)
What: test_mlperf_tiny_classification_mse_cpu_vs_npu used the Python
edge reference instead of the portable-kernel C++ reference for the QAT
plus channels-last variant, because that configuration segfaulted in the
portable kernels.
Why: the crash is fixed on current main (issue
pytorch#22179). The reporter's
stack predates two out-of-bounds fixes in the portable dequantize path
that this model exercises at runtime (16 per-channel dequantize ops):
pytorch#21517 fixed an out-of-bounds traversal for non-contiguous
(channels-last) inputs, and pytorch#21773 fixed misreading int32 zero points as
int64. The int32 zero points are QAT-only: QAT emits int32 bias zero
points while PTQ emits int64, matching the issue's QAT-only signature.
Verification: exported the exact failing configuration (QAT,
channels-last, 15-epoch training, dataset calibration, NXP edge passes)
and ran it with the portable-kernel executor_runner. It runs cleanly and
its outputs bit-match the eager quantized reference. The
quantized_kernels_test suite passes 74/74, including the regression
tests from both fixes. lintrunner reports no issues on the touched file.
The NXP SDK-gated test itself was not run here (no SDK); NXP CI will
exercise it.
Fixes pytorch#22179
Authored with AI assistance (Muse Code).
cc @robert-kalmar @digantdesai @rascani1 parent ec15631 commit 65aacaa
1 file changed
Lines changed: 1 addition & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 83 | | |
94 | 84 | | |
95 | 85 | | |
96 | 86 | | |
97 | 87 | | |
98 | 88 | | |
99 | 89 | | |
100 | | - | |
| 90 | + | |
101 | 91 | | |
102 | 92 | | |
103 | 93 | | |
| |||
0 commit comments