Skip to content

Commit

Permalink
fix test_quantization in PyTorch 1.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed May 23, 2023
1 parent 99eb909 commit cff9985
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ patches = [
'PyTorch-1.11.0_increase-distributed-test-timeout.patch',
'PyTorch-1.11.0_install-vsx-vec-headers.patch',
'PyTorch-1.11.1_skip-test_init_from_local_shards.patch',
'PyTorch-1.12.1_add-hypothesis-suppression.patch',
'PyTorch-1.12.1_fix-cuda-gcc-version-check.patch',
'PyTorch-1.12.1_fix-skip-decorators.patch',
'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch',
Expand Down Expand Up @@ -63,6 +64,8 @@ checksums = [
'f2e6b9625733d9a471bb75e1ea20e28814cf1380b4f9089aa838ee35ddecf07d', # PyTorch-1.11.0_install-vsx-vec-headers.patch
# PyTorch-1.11.1_skip-test_init_from_local_shards.patch
'4aeb1b0bc863d4801b0095cbce69f8794066748f0df27c6aaaf729c5ecba04b7',
# PyTorch-1.12.1_add-hypothesis-suppression.patch
'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c',
# PyTorch-1.12.1_fix-cuda-gcc-version-check.patch
'a650f4576f06c749f244cada52ff9c02499fa8f182019129488db3845e0756ab',
'e3ca6e42b2fa592ea095939fb59ab875668a058479407db3f3684cc5c6f4146c', # PyTorch-1.12.1_fix-skip-decorators.patch
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyconfigs/p/PyTorch/PyTorch-1.12.1-foss-2021a.eb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ patches = [
'PyTorch-1.11.0_increase_c10d_gloo_timeout.patch',
'PyTorch-1.11.0_increase-distributed-test-timeout.patch',
'PyTorch-1.11.0_install-vsx-vec-headers.patch',
'PyTorch-1.12.1_add-hypothesis-suppression.patch',
'PyTorch-1.12.1_fix-cuda-gcc-version-check.patch',
'PyTorch-1.12.1_fix-skip-decorators.patch',
'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch',
Expand Down Expand Up @@ -59,6 +60,8 @@ checksums = [
# PyTorch-1.11.0_increase-distributed-test-timeout.patch
'087ad20163a1291773ae3457569b80523080eb3731e210946459b2333a919f3f',
'f2e6b9625733d9a471bb75e1ea20e28814cf1380b4f9089aa838ee35ddecf07d', # PyTorch-1.11.0_install-vsx-vec-headers.patch
# PyTorch-1.12.1_add-hypothesis-suppression.patch
'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c',
# PyTorch-1.12.1_fix-cuda-gcc-version-check.patch
'a650f4576f06c749f244cada52ff9c02499fa8f182019129488db3845e0756ab',
'e3ca6e42b2fa592ea095939fb59ab875668a058479407db3f3684cc5c6f4146c', # PyTorch-1.12.1_fix-skip-decorators.patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ patches = [
'PyTorch-1.11.0_increase-distributed-test-timeout.patch',
'PyTorch-1.11.0_install-vsx-vec-headers.patch',
'PyTorch-1.11.1_skip-test_init_from_local_shards.patch',
'PyTorch-1.12.1_add-hypothesis-suppression.patch',
'PyTorch-1.12.1_fix-autograd-thread_shutdown-test.patch',
'PyTorch-1.12.1_fix-cuda-gcc-version-check.patch',
'PyTorch-1.12.1_fix-skip-decorators.patch',
Expand Down Expand Up @@ -68,6 +69,8 @@ checksums = [
'f2e6b9625733d9a471bb75e1ea20e28814cf1380b4f9089aa838ee35ddecf07d', # PyTorch-1.11.0_install-vsx-vec-headers.patch
# PyTorch-1.11.1_skip-test_init_from_local_shards.patch
'4aeb1b0bc863d4801b0095cbce69f8794066748f0df27c6aaaf729c5ecba04b7',
# PyTorch-1.12.1_add-hypothesis-suppression.patch
'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c',
# PyTorch-1.12.1_fix-autograd-thread_shutdown-test.patch
'd97cd6b0570a167ecc3e631dc4ea884d95ace285cc38aa980566f4fec2c0d089',
# PyTorch-1.12.1_fix-cuda-gcc-version-check.patch
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyconfigs/p/PyTorch/PyTorch-1.12.1-foss-2021b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ patches = [
'PyTorch-1.11.0_increase_c10d_gloo_timeout.patch',
'PyTorch-1.11.0_increase-distributed-test-timeout.patch',
'PyTorch-1.11.0_install-vsx-vec-headers.patch',
'PyTorch-1.12.1_add-hypothesis-suppression.patch',
'PyTorch-1.12.1_fix-cuda-gcc-version-check.patch',
'PyTorch-1.12.1_fix-skip-decorators.patch',
'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch',
Expand Down Expand Up @@ -63,6 +64,8 @@ checksums = [
# PyTorch-1.11.0_increase-distributed-test-timeout.patch
'087ad20163a1291773ae3457569b80523080eb3731e210946459b2333a919f3f',
'f2e6b9625733d9a471bb75e1ea20e28814cf1380b4f9089aa838ee35ddecf07d', # PyTorch-1.11.0_install-vsx-vec-headers.patch
# PyTorch-1.12.1_add-hypothesis-suppression.patch
'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c',
# PyTorch-1.12.1_fix-cuda-gcc-version-check.patch
'a650f4576f06c749f244cada52ff9c02499fa8f182019129488db3845e0756ab',
'e3ca6e42b2fa592ea095939fb59ab875668a058479407db3f3684cc5c6f4146c', # PyTorch-1.12.1_fix-skip-decorators.patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ patches = [
'PyTorch-1.11.0_increase-distributed-test-timeout.patch',
'PyTorch-1.11.0_install-vsx-vec-headers.patch',
'PyTorch-1.11.1_skip-test_init_from_local_shards.patch',
'PyTorch-1.12.1_add-hypothesis-suppression.patch',
'PyTorch-1.12.1_fix-autograd-thread_shutdown-test.patch',
'PyTorch-1.12.1_fix-cuda-gcc-version-check.patch',
'PyTorch-1.12.1_fix-skip-decorators.patch',
Expand Down Expand Up @@ -68,6 +69,8 @@ checksums = [
'f2e6b9625733d9a471bb75e1ea20e28814cf1380b4f9089aa838ee35ddecf07d', # PyTorch-1.11.0_install-vsx-vec-headers.patch
# PyTorch-1.11.1_skip-test_init_from_local_shards.patch
'4aeb1b0bc863d4801b0095cbce69f8794066748f0df27c6aaaf729c5ecba04b7',
# PyTorch-1.12.1_add-hypothesis-suppression.patch
'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c',
# PyTorch-1.12.1_fix-autograd-thread_shutdown-test.patch
'd97cd6b0570a167ecc3e631dc4ea884d95ace285cc38aa980566f4fec2c0d089',
# PyTorch-1.12.1_fix-cuda-gcc-version-check.patch
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyconfigs/p/PyTorch/PyTorch-1.12.1-foss-2022a.eb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ patches = [
'PyTorch-1.11.0_increase_c10d_gloo_timeout.patch',
'PyTorch-1.11.0_increase-distributed-test-timeout.patch',
'PyTorch-1.11.0_install-vsx-vec-headers.patch',
'PyTorch-1.12.1_add-hypothesis-suppression.patch',
'PyTorch-1.12.1_fix-cuda-gcc-version-check.patch',
'PyTorch-1.12.1_fix-skip-decorators.patch',
'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch',
Expand Down Expand Up @@ -63,6 +64,8 @@ checksums = [
# PyTorch-1.11.0_increase-distributed-test-timeout.patch
'087ad20163a1291773ae3457569b80523080eb3731e210946459b2333a919f3f',
'f2e6b9625733d9a471bb75e1ea20e28814cf1380b4f9089aa838ee35ddecf07d', # PyTorch-1.11.0_install-vsx-vec-headers.patch
# PyTorch-1.12.1_add-hypothesis-suppression.patch
'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c',
# PyTorch-1.12.1_fix-cuda-gcc-version-check.patch
'a650f4576f06c749f244cada52ff9c02499fa8f182019129488db3845e0756ab',
'e3ca6e42b2fa592ea095939fb59ab875668a058479407db3f3684cc5c6f4146c', # PyTorch-1.12.1_fix-skip-decorators.patch
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The @settings decorator overwrites `suppress_health_check` accidentally removing the `too_slow` filter
inherited by the profile.
Add it explicitely.
See https://github.com/easybuilders/easybuild-easyconfigs/issues/17615#issuecomment-1504930435

Author: Alexander Grund (TU Dresden)

diff --git a/test/quantization/core/test_quantized_op.py b/test/quantization/core/test_quantized_op.py
index 41e90bc6ec7..c19324cf86a 100644
--- a/test/quantization/core/test_quantized_op.py
+++ b/test/quantization/core/test_quantized_op.py
@@ -5569,7 +5569,7 @@ class TestQNNPackOps(TestCase):
msg="QNNPACK Sigmoid failed (FBGEMM ref)!")

"""Tests the correctness of the quantized::add (qnnpack) op."""
- @settings(suppress_health_check=(HealthCheck.filter_too_much,))
+ @settings(suppress_health_check=(HealthCheck.filter_too_much, HealthCheck.too_slow))
@given(A=hu.tensor(shapes=hu.array_shapes(1, 5, 1, 5),
qparams=hu.qparams(dtypes=[torch.quint8, torch.qint8])),
zero_point=st.sampled_from([0, 2, 5, 15, 127]),

0 comments on commit cff9985

Please sign in to comment.