[ExecuTorch][WebGPU] Op-test harness: int8-output golden support#21189
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21189
Note: Links to docs will display an error until the docs builds have been completed. ❌ 46 New Failures, 3 Unrelated FailuresAs of commit 0de0fe2 with merge base 4a26c64 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
This was referenced Jul 22, 2026
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
JCNTH
added a commit
that referenced
this pull request
Jul 24, 2026
Pull Request resolved: #21189 Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (`quantize_per_tensor`, and the wider q8ta family) cannot be goldened — a round-trip through `dequantize` folds to identity under ET's QDQ-cancel and tests nothing. Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension. Implementation: `generate_op_tests.py` detects an int8 output, writes the golden as raw int8 bytes, records `"dtype": "int8"` in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched). `driver_util` parses the golden `dtype` (default `"float32"`, so old manifests are unchanged) and adds `load_int8_bin`. `op_test_driver.cpp` branches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep the `within_tol` path. ghstack-source-id: 406366826 @exported-using-ghexport Differential Revision: [D112257633](https://our.internmc.facebook.com/intern/diff/D112257633/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Problem: The op-test framework compares outputs as fp32 only, so an int8-output op (
quantize_per_tensor, and the wider q8ta family) cannot be goldened — a round-trip throughdequantizefolds to identity under ET's QDQ-cancel and tests nothing.Solution: Add an int8 golden path, keyed off the output tensor's dtype, alongside the existing fp32 path (which is byte-identical for every existing op). This mirrors the earlier multi-output framework extension.
Implementation:
generate_op_tests.pydetects an int8 output, writes the golden as raw int8 bytes, records"dtype": "int8"in the manifest, and skips the fp32 cast + dual-oracle gate (fp32/float64 goldens are untouched).driver_utilparses the goldendtype(default"float32", so old manifests are unchanged) and addsload_int8_bin.op_test_driver.cppbranches on the dtype: int8 goldens compare byte-exact (a discrete grid — any deviation is a real bug), fp32 goldens keep thewithin_tolpath.@exported-using-ghexport
Differential Revision: D112257633
Differential Revision: D112257633