You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
De-flake quantize tests and break pt2_compliant_tag cascade (#5911)
Summary:
Pull Request resolved: #5911
Opcheck / test-health bookkeeping fixes for the fbgemm_dev OMH dashboard (T191384137):
1. (2c) pt2_compliant_tag cascade (test/jagged/common.py): when an op is tagged pt2_compliant_tag but has legitimately-xfailed opcheck sub-tests (recorded in failures_dict.json), the auto-generated test_pt2_compliant_tag_fbgemm_<op> test still fails with a cascading assertion. These cannot be expressed in failures_dict.json, so skip them via additional_decorators until the underlying opcheck gaps are fixed. Covers jagged_dense_elementwise_add and jagged_to_padded_dense.
2. (2e) Numeric de-flaking (test/quantize/bfloat16_test.py, mixed_dim_int8_test.py): the bf16 round-trip / numpy-reference comparisons previously used assert_close defaults (or a dynamic atol that always collapsed to 1e-2, since torch.rand inputs are in [0,1)). Replace with explicit rtol=1e-2, atol=1e-2 -- rtol already scales tolerance with magnitude, so this loosens the tight defaults without misleading dead code. mixed_dim_int8_test.py keeps the magnitude-scaled atol because its inputs come from torch.randn (magnitudes > 1), where the scaling legitimately applies.
3. (2d) Fix histogram_binning_calibration FakeTensor device bug + remove now-valid xfail: fbgemm::histogram_binning_calibration test_faketensor was marked xfail in test/sparse/failures_dict.json. The meta impl histogram_binning_calibration_abstract existed but allocated the bin_ids output on CPU instead of logit.device, so on GPU the fake output device diverged from the real kernel, failing test_faketensor (LAND_BLOCKING). Added device=logit.device to the bin_ids allocation (matching the real CPU/CUDA kernels and the sibling generic_histogram_binning_calibration_by_feature impl), then removed the now-passing xfail entry. NOTE: other failures_dicts should be re-swept with PYTORCH_OPCHECK_ACCEPT=1 on NVIDIA to catch any remaining XPASS entries.
Reviewed By: spcyppt
Differential Revision: D108686545
fbshipit-source-id: c38a8edad8ed5a8cd4989352e68520937e5fe310
0 commit comments