Skip to content

add patch to skip broken test_wrap_bad + add unittest-xml-reporting build dependency to PyTorch 1.13.1#22357

Open
Flamefire wants to merge 4 commits into
easybuilders:developfrom
Flamefire:20250221133605_new_pr_PyTorch1131
Open

add patch to skip broken test_wrap_bad + add unittest-xml-reporting build dependency to PyTorch 1.13.1#22357
Flamefire wants to merge 4 commits into
easybuilders:developfrom
Flamefire:20250221133605_new_pr_PyTorch1131

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

@Flamefire Flamefire commented Feb 21, 2025

@Flamefire Flamefire force-pushed the 20250221133605_new_pr_PyTorch1131 branch from 1460af9 to ab8adfe Compare February 21, 2025 12:36
@github-actions github-actions Bot removed the update label Feb 21, 2025
@easybuilders easybuilders deleted a comment from github-actions Bot Feb 21, 2025
@boegel boegel changed the title Add unittest-xml-reporting to PyTorch 1.13 (foss 2022b) Add unittest-xml-reporting build dependency to PyTorch 1.13 (foss 2022b) Feb 26, 2025
@Flamefire
Copy link
Copy Markdown
Contributor Author

Test report by @Flamefire
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3633
SUCCESS
Build succeeded for 6 out of 6 (2 easyconfigs in total)
i7071 - Linux Rocky Linux 8.9 (Green Obsidian), x86_64, AMD EPYC 7702 64-Core Processor (zen2), Python 3.8.17
See https://gist.github.com/Flamefire/3c99b7211d389969079f8d7b6db8173a for a full test report.

@github-actions
Copy link
Copy Markdown

Updated software PyTorch-1.13.1-foss-2022b-CUDA-12.0.0.eb

Diff against PyTorch-2.1.2-foss-2023b.eb

easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023b.eb

diff --git a/easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023b.eb b/easybuild/easyconfigs/p/PyTorch/PyTorch-1.13.1-foss-2022b-CUDA-12.0.0.eb
index bce1b68aa7..95b774a07b 100644
--- a/easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023b.eb
+++ b/easybuild/easyconfigs/p/PyTorch/PyTorch-1.13.1-foss-2022b-CUDA-12.0.0.eb
@@ -1,160 +1,155 @@
 name = 'PyTorch'
-version = '2.1.2'
+version = '1.13.1'
+versionsuffix = '-CUDA-%(cudaver)s'
 
 homepage = 'https://pytorch.org/'
 description = """Tensors and Dynamic neural networks in Python with strong GPU acceleration.
 PyTorch is a deep learning framework that puts Python first."""
 
-toolchain = {'name': 'foss', 'version': '2023b'}
+toolchain = {'name': 'foss', 'version': '2022b'}
 
 source_urls = [GITHUB_RELEASE]
 sources = ['%(namelower)s-v%(version)s.tar.gz']
 patches = [
     'PyTorch-1.7.0_disable-dev-shm-test.patch',
+    'PyTorch-1.10.0_fix-kineto-crash.patch',
+    'PyTorch-1.11.0_fix-fp16-quantization-without-fbgemm.patch',
     'PyTorch-1.11.1_skip-test_init_from_local_shards.patch',
+    'PyTorch-1.12.0_fix-EmbeddingBag-without-fbgemm.patch',
     'PyTorch-1.12.1_add-hypothesis-suppression.patch',
+    'PyTorch-1.12.1_fix-skip-decorators.patch',
     'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch',
+    'PyTorch-1.12.1_fix-test_wishart_log_prob.patch',
     'PyTorch-1.12.1_fix-TestTorch.test_to.patch',
+    'PyTorch-1.12.1_fix-use-after-free-in-tensorpipe-agent.patch',
+    'PyTorch-1.12.1_fix-vsx-loadu.patch',
+    'PyTorch-1.12.1_fix-vsx-vector-funcs.patch',
     'PyTorch-1.12.1_skip-test_round_robin.patch',
+    'PyTorch-1.13.1_add-cuda12-compat.patch',
+    'PyTorch-1.13.1_disable-test-sharding.patch',
+    'PyTorch-1.13.1_fix-flaky-jit-test.patch',
+    'PyTorch-1.13.1_fix-fsdp-fp16-test.patch',
+    'PyTorch-1.13.1_fix-fsdp-tp-integration-test.patch',
+    'PyTorch-1.13.1_fix-gcc-12-missing-includes.patch',
     'PyTorch-1.13.1_fix-gcc-12-warning-in-fbgemm.patch',
+    'PyTorch-1.13.1_fix-kineto-crash-on-exit.patch',
+    'PyTorch-1.13.1_fix-numpy-deprecations.patch',
     'PyTorch-1.13.1_fix-protobuf-dependency.patch',
+    'PyTorch-1.13.1_fix-pytest-args.patch',
+    'PyTorch-1.13.1_fix-python-3.11-compat.patch',
+    'PyTorch-1.13.1_fix-test-ops-conf.patch',
     'PyTorch-1.13.1_fix-warning-in-test-cpp-api.patch',
+    'PyTorch-1.13.1_fix-wrong-check-in-fsdp-tests.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_jit.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_ops.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_optim.patch',
+    'PyTorch-1.13.1_install-vsx-vec-headers.patch',
+    'PyTorch-1.13.1_no-cuda-stubs-rpath.patch',
+    'PyTorch-1.13.1_remove-flaky-test-in-testnn.patch',
+    'PyTorch-1.13.1_skip-failing-grad-test.patch',
     'PyTorch-1.13.1_skip-failing-singular-grad-test.patch',
+    'PyTorch-1.13.1_skip-test-requiring-online-access.patch',
     'PyTorch-1.13.1_skip-tests-without-fbgemm.patch',
-    'PyTorch-2.0.1_avoid-test_quantization-failures.patch',
-    'PyTorch-2.0.1_fix-skip-decorators.patch',
-    'PyTorch-2.0.1_fix-ub-in-inductor-codegen.patch',
-    'PyTorch-2.0.1_fix-vsx-loadu.patch',
-    'PyTorch-2.0.1_no-cuda-stubs-rpath.patch',
-    'PyTorch-2.0.1_skip-failing-gradtest.patch',
-    'PyTorch-2.0.1_skip-test_shuffle_reproducibility.patch',
-    'PyTorch-2.0.1_skip-tests-skipped-in-subprocess.patch',
-    'PyTorch-2.1.0_disable-gcc12-warning.patch',
-    'PyTorch-2.1.0_fix-bufferoverflow-in-oneDNN.patch',
-    'PyTorch-2.1.0_fix-test_numpy_torch_operators.patch',
-    'PyTorch-2.1.0_fix-validationError-output-test.patch',
-    'PyTorch-2.1.0_fix-vsx-vector-shift-functions.patch',
-    'PyTorch-2.1.0_increase-tolerance-functorch-test_vmapvjpvjp.patch',
-    'PyTorch-2.1.0_remove-sparse-csr-nnz-overflow-test.patch',
-    'PyTorch-2.1.0_remove-test-requiring-online-access.patch',
-    'PyTorch-2.1.0_skip-diff-test-on-ppc.patch',
-    'PyTorch-2.1.0_skip-dynamo-test_predispatch.patch',
-    'PyTorch-2.1.0_skip-test_jvp_linalg_det_singular.patch',
-    'PyTorch-2.1.0_skip-test_linear_fp32-without-MKL.patch',
-    'PyTorch-2.1.0_skip-test_wrap_bad.patch',
-    'PyTorch-2.1.2_fix-test_extension_backend-without-vectorization.patch',
-    'PyTorch-2.1.2_fix-test_memory_profiler.patch',
-    'PyTorch-2.1.2_fix-test_torchinductor-rounding.patch',
-    'PyTorch-2.1.2_fix-vsx-vector-abs.patch',
-    'PyTorch-2.1.2_fix-vsx-vector-div.patch',
-    'PyTorch-2.1.2_skip-cpu_repro-test-without-vectorization.patch',
-    'PyTorch-2.1.2_skip-memory-leak-test.patch',
-    'PyTorch-2.1.2_workaround_dynamo_failure_without_nnpack.patch',
+    'PyTorch-1.13.1_skip-test_wrap_bad.patch',
 ]
 checksums = [
-    {'pytorch-v2.1.2.tar.gz': '85effbcce037bffa290aea775c9a4bad5f769cb229583450c40055501ee1acd7'},
+    {'pytorch-v1.13.1.tar.gz': 'dbc229ee9750b02b514937d017744443a269ea0241ed3f32b9af0703589d25d4'},
     {'PyTorch-1.7.0_disable-dev-shm-test.patch': '622cb1eaeadc06e13128a862d9946bcc1f1edd3d02b259c56a9aecc4d5406b8a'},
+    {'PyTorch-1.10.0_fix-kineto-crash.patch': 'dc467333b28162149af8f675929d8c6bf219f23230bfc0d39af02ba4f6f882eb'},
+    {'PyTorch-1.11.0_fix-fp16-quantization-without-fbgemm.patch':
+     'cc526130b6446bbbf5f0f7372d3aeee3e7d4c4d6e471524dff028b430b152934'},
     {'PyTorch-1.11.1_skip-test_init_from_local_shards.patch':
      '4aeb1b0bc863d4801b0095cbce69f8794066748f0df27c6aaaf729c5ecba04b7'},
+    {'PyTorch-1.12.0_fix-EmbeddingBag-without-fbgemm.patch':
+     '090598592283e3fc46ee08a68b6a6afe07be41b26514afba51834408bf1c98ed'},
     {'PyTorch-1.12.1_add-hypothesis-suppression.patch':
      'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c'},
+    {'PyTorch-1.12.1_fix-skip-decorators.patch': 'e3ca6e42b2fa592ea095939fb59ab875668a058479407db3f3684cc5c6f4146c'},
     {'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch':
      '1efc9850c431d702e9117d4766277d3f88c5c8b3870997c9974971bce7f2ab83'},
+    {'PyTorch-1.12.1_fix-test_wishart_log_prob.patch':
+     'cf475ae6e6234b96c8d1bf917597c5176c94b3ccd940b72f2e1cd0c979580f45'},
     {'PyTorch-1.12.1_fix-TestTorch.test_to.patch': '75f27987c3f25c501e719bd2b1c70a029ae0ee28514a97fe447516aee02b1535'},
+    {'PyTorch-1.12.1_fix-use-after-free-in-tensorpipe-agent.patch':
+     '0bd7e88b92c4c6f0fecf01746009858ba19f2df68b10b88c41485328a531875d'},
+    {'PyTorch-1.12.1_fix-vsx-loadu.patch': '8bfe3c94ada1dd1f7974a1261a8b576fb7ae944050fa1c7830fca033831123b2'},
+    {'PyTorch-1.12.1_fix-vsx-vector-funcs.patch': 'caccbf60f62eac313896c1eaec78b08f5d0fdfcb907079087490bb13d1561aa2'},
     {'PyTorch-1.12.1_skip-test_round_robin.patch': '63d4849b78605aa088fdff695637d9473ea60dee603a3ff7f788690d70c55349'},
+    {'PyTorch-1.13.1_add-cuda12-compat.patch': 'ceb0f9b28736982a1d7ced603f606bbbe87846b3d0224547df9ab6bb51429992'},
+    {'PyTorch-1.13.1_disable-test-sharding.patch': 'df2074adeba47998ce2993d99ca64eb6f1c79ab7057f553b436efdec264d3572'},
+    {'PyTorch-1.13.1_fix-flaky-jit-test.patch': '71efdeb29b5e5b4982c9f5cb2182733654a34d52f85bb5487bc4d7d99b86101b'},
+    {'PyTorch-1.13.1_fix-fsdp-fp16-test.patch': '8ae68e60d6e1f92f50322b7f0381c7e65251fba32d7606e3a238a36a2f55b5cf'},
+    {'PyTorch-1.13.1_fix-fsdp-tp-integration-test.patch':
+     '31e2d63b54ae1a8c554575f46db79bf8bbda851b6ca0ffe623c4911207a3c2bc'},
+    {'PyTorch-1.13.1_fix-gcc-12-missing-includes.patch':
+     '18df8c61ecaa9fb659346c1e172828bca6b069f0145bb8f6a36b0a23b7bef0a6'},
     {'PyTorch-1.13.1_fix-gcc-12-warning-in-fbgemm.patch':
      '5c7be91a6096083a0b1315efe0001537499c600f1f569953c6a2c7f4cc1d0910'},
+    {'PyTorch-1.13.1_fix-kineto-crash-on-exit.patch':
+     'f1e6808ee8d91a2ad76e0caedb4685e5aec3008d5e2e3c3c3e88cbb25cbd71b4'},
+    {'PyTorch-1.13.1_fix-numpy-deprecations.patch': 'f461b570efe0434ddd806bf2fa7020eb213e3ed89d0eb4403e076f4276ba2a46'},
     {'PyTorch-1.13.1_fix-protobuf-dependency.patch':
      '8bd755a0cab7233a243bc65ca57c9630dfccdc9bf8c9792f0de4e07a644fcb00'},
+    {'PyTorch-1.13.1_fix-pytest-args.patch': 'd3e3c841cf8d73683750f29326f2be56ee0bb5df7ff522baf7d7c3f301a91ec2'},
+    {'PyTorch-1.13.1_fix-python-3.11-compat.patch': 'fa4eb0e27e00a90bb217b77c0023089c4659c03f37d781ab4a681bdcb4f0432f'},
+    {'PyTorch-1.13.1_fix-test-ops-conf.patch': 'df652eec7753864ebebbfeca546929a53e3fb8f24259d5c9b964266a8551198c'},
     {'PyTorch-1.13.1_fix-warning-in-test-cpp-api.patch':
      'bdde0f2105215c95a54de64ec4b1a4520528510663174fef6d5b900eb1db3937'},
+    {'PyTorch-1.13.1_fix-wrong-check-in-fsdp-tests.patch':
+     'cbb5ca9ad668a504a456a2cc02d7254b79ddfd9a971a1648f0508fb103a9fc89'},
+    {'PyTorch-1.13.1_increase-tolerance-test_jit.patch':
+     'b97913754a0ae0887b8137db0b0d57caff8c3d7bd96fe555ea27ea01ff14527a'},
+    {'PyTorch-1.13.1_increase-tolerance-test_ops.patch':
+     'c909fdfc2b12df457e1eb5514265ffec3eab653994949416f3f048668421e223'},
+    {'PyTorch-1.13.1_increase-tolerance-test_optim.patch':
+     'a079d824085eab89794f5ecfc67792f735ed8cfd3fe7db52e4dea62e583cfe06'},
+    {'PyTorch-1.13.1_install-vsx-vec-headers.patch':
+     '7b678f54bb947afd4767f5877ac424b4b94ce5db609ea20f5a869ccf4027035f'},
+    {'PyTorch-1.13.1_no-cuda-stubs-rpath.patch': '4c636059850fc9d1ecb27ce275f8aad5d5b6fdc19e35aff0c25b86cb3201352a'},
+    {'PyTorch-1.13.1_remove-flaky-test-in-testnn.patch':
+     'be83ff61fe2dedab6d49c232936d5622df81ab49154264490021c6c828e53315'},
+    {'PyTorch-1.13.1_skip-failing-grad-test.patch': '6681200f9509893cb9231b5c93ac9bc5e6d9d9ae4febefca52e7cbc843ba8f51'},
     {'PyTorch-1.13.1_skip-failing-singular-grad-test.patch':
      '72688a57b2bb617665ad1a1d5e362c5111ae912c10936bb38a089c0204729f48'},
+    {'PyTorch-1.13.1_skip-test-requiring-online-access.patch':
+     '61c3b7859dc06a9969981b07aa2789630de110d6d1d3633d27364be47af74712'},
     {'PyTorch-1.13.1_skip-tests-without-fbgemm.patch':
      '481e595f673baf8ae58b41697a6792b83048b0264aa79b422f48cd8c22948bb7'},
-    {'PyTorch-2.0.1_avoid-test_quantization-failures.patch':
-     '02e3f47e4ed1d7d6077e26f1ae50073dc2b20426269930b505f4aefe5d2f33cd'},
-    {'PyTorch-2.0.1_fix-skip-decorators.patch': '2039012cef45446065e1a2097839fe20bb29fe3c1dcc926c3695ebf29832e920'},
-    {'PyTorch-2.0.1_fix-ub-in-inductor-codegen.patch':
-     '1b37194f55ae678f3657b8728dfb896c18ffe8babe90987ce468c4fa9274f357'},
-    {'PyTorch-2.0.1_fix-vsx-loadu.patch': 'a0ffa61da2d47c6acd09aaf6d4791e527d8919a6f4f1aa7ed38454cdcadb1f72'},
-    {'PyTorch-2.0.1_no-cuda-stubs-rpath.patch': '8902e58a762240f24cdbf0182e99ccdfc2a93492869352fcb4ca0ec7e407f83a'},
-    {'PyTorch-2.0.1_skip-failing-gradtest.patch': '8030bdec6ba49b057ab232d19a7f1a5e542e47e2ec340653a246ec9ed59f8bc1'},
-    {'PyTorch-2.0.1_skip-test_shuffle_reproducibility.patch':
-     '7047862abc1abaff62954da59700f36d4f39fcf83167a638183b1b7f8fec78ae'},
-    {'PyTorch-2.0.1_skip-tests-skipped-in-subprocess.patch':
-     '166c134573a95230e39b9ea09ece3ad8072f39d370c9a88fb2a1e24f6aaac2b5'},
-    {'PyTorch-2.1.0_disable-gcc12-warning.patch': 'c858b8db0010f41005dc06f9a50768d0d3dc2d2d499ccbdd5faf8a518869a421'},
-    {'PyTorch-2.1.0_fix-bufferoverflow-in-oneDNN.patch':
-     'b15b1291a3c37bf6a4982cfbb3483f693acb46a67bc0912b383fd98baf540ccf'},
-    {'PyTorch-2.1.0_fix-test_numpy_torch_operators.patch':
-     '84bb51a719abc677031a7a3dfe4382ff098b0cbd8b39b8bed2a7fa03f80ac1e9'},
-    {'PyTorch-2.1.0_fix-validationError-output-test.patch':
-     '7eba0942afb121ed92fac30d1529447d892a89eb3d53c565f8e9d480e95f692b'},
-    {'PyTorch-2.1.0_fix-vsx-vector-shift-functions.patch':
-     '3793b4b878be1abe7791efcbd534774b87862cfe7dc4774ca8729b6cabb39e7e'},
-    {'PyTorch-2.1.0_increase-tolerance-functorch-test_vmapvjpvjp.patch':
-     'aef38adf1210d0c5455e91d7c7a9d9e5caad3ae568301e0ba9fc204309438e7b'},
-    {'PyTorch-2.1.0_remove-sparse-csr-nnz-overflow-test.patch':
-     '0ac36411e76506b3354c85a8a1260987f66af947ee52ffc64230aee1fa02ea8b'},
-    {'PyTorch-2.1.0_remove-test-requiring-online-access.patch':
-     '35184b8c5a1b10f79e511cc25db3b8a5585a5d58b5d1aa25dd3d250200b14fd7'},
-    {'PyTorch-2.1.0_skip-diff-test-on-ppc.patch': '394157dbe565ffcbc1821cd63d05930957412156cc01e949ef3d3524176a1dda'},
-    {'PyTorch-2.1.0_skip-dynamo-test_predispatch.patch':
-     '6298daf9ddaa8542850eee9ea005f28594ab65b1f87af43d8aeca1579a8c4354'},
-    {'PyTorch-2.1.0_skip-test_jvp_linalg_det_singular.patch':
-     '5229ca88a71db7667a90ddc0b809b2c817698bd6e9c5aaabd73d3173cf9b99fe'},
-    {'PyTorch-2.1.0_skip-test_linear_fp32-without-MKL.patch':
-     '5dcc79883b6e3ec0a281a8e110db5e0a5880de843bb05653589891f16473ead5'},
-    {'PyTorch-2.1.0_skip-test_wrap_bad.patch': 'b8583125ee94e553b6f77c4ab4bfa812b89416175dc7e9b7390919f3b485cb63'},
-    {'PyTorch-2.1.2_fix-test_extension_backend-without-vectorization.patch':
-     'cd1455495886a7d6b2d30d48736eb0103fded21e2e36de6baac719b9c52a1c92'},
-    {'PyTorch-2.1.2_fix-test_memory_profiler.patch':
-     '30b0c9355636c0ab3dedae02399789053825dc3835b4d7dac6e696767772b1ce'},
-    {'PyTorch-2.1.2_fix-test_torchinductor-rounding.patch':
-     'a0ef99192ee2ad1509c78a8377023d5be2b5fddb16f84063b7c9a0b53d979090'},
-    {'PyTorch-2.1.2_fix-vsx-vector-abs.patch': 'd67d32407faed7dc1dbab4bba0e2f7de36c3db04560ced35c94caf8d84ade886'},
-    {'PyTorch-2.1.2_fix-vsx-vector-div.patch': '11f497a6892eb49b249a15320e4218e0d7ac8ae4ce67de39e4a018a064ca1acc'},
-    {'PyTorch-2.1.2_skip-cpu_repro-test-without-vectorization.patch':
-     '7ace835af60c58d9e0754a34c19d4b9a0c3a531f19e5d0eba8e2e49206eaa7eb'},
-    {'PyTorch-2.1.2_skip-memory-leak-test.patch': '8d9841208e8a00a498295018aead380c360cf56e500ef23ca740adb5b36de142'},
-    {'PyTorch-2.1.2_workaround_dynamo_failure_without_nnpack.patch':
-     'fb96eefabf394617bbb3fbd3a7a7c1aa5991b3836edc2e5d2a30e708bfe49ba1'},
+    {'PyTorch-1.13.1_skip-test_wrap_bad.patch': 'c97e2b7369e4618ab7d0ef81002bc6147db1b713197766aacd1ca16f0fbb1ced'},
 ]
 
 osdependencies = [OS_PKG_IBVERBS_DEV]
 
 builddependencies = [
-    ('CMake', '3.27.6'),
-    ('hypothesis', '6.90.0'),
+    ('CMake', '3.24.3'),
+    ('hypothesis', '6.68.2'),
     # For tests
-    ('pytest-flakefinder', '1.1.0'),
-    ('pytest-rerunfailures', '14.0'),
+    ('pytest-rerunfailures', '12.0'),
     ('pytest-shard', '0.1.2'),
+    ('unittest-xml-reporting', '3.1.0'),
 ]
 
 dependencies = [
+    ('CUDA', '12.0.0', '', SYSTEM),
     ('Ninja', '1.11.1'),  # Required for JIT compilation of C++ extensions
-    ('Python', '3.11.5'),
-    ('Python-bundle-PyPI', '2023.10'),
-    ('protobuf', '25.3'),
-    ('protobuf-python', '4.25.3'),
-    ('pybind11', '2.11.1'),
-    ('SciPy-bundle', '2023.11'),
-    ('PyYAML', '6.0.1'),
-    ('MPFR', '4.2.1'),
-    ('GMP', '6.3.0'),
+    ('Python', '3.10.8'),
+    ('protobuf', '23.0'),
+    ('protobuf-python', '4.23.0'),
+    ('pybind11', '2.10.3'),
+    ('SciPy-bundle', '2023.02'),
+    ('PyYAML', '6.0'),
+    ('MPFR', '4.2.0'),
+    ('GMP', '6.2.1'),
     ('numactl', '2.0.16'),
-    ('FFmpeg', '6.0'),
-    ('Pillow', '10.2.0'),
-    ('expecttest', '0.2.1'),
-    ('networkx', '3.2.1'),
-    ('sympy', '1.12'),
-    ('Z3', '4.13.0',),
+    ('FFmpeg', '5.1.2'),
+    ('Pillow', '9.4.0'),
+    ('cuDNN', '8.8.0.121', '-CUDA-%(cudaver)s', SYSTEM),
+    ('magma', '2.7.1', '-CUDA-%(cudaver)s'),
+    ('NCCL', '2.16.2', '-CUDA-%(cudaver)s'),
+    ('expecttest', '0.1.3'),
 ]
 
-use_pip = True
-buildcmd = '%(python)s setup.py build'  # Run the (long) build in the build step
+custom_opts = ['CMAKE_CXX_STANDARD=17']
 
 excluded_tests = {
     '': [
@@ -175,6 +170,13 @@ excluded_tests = {
 
 runtest = 'cd test && PYTHONUNBUFFERED=1 %(python)s run_test.py --continue-through-error  --verbose %(excluded_tests)s'
 
+# The readelf sanity check command can be taken out once the TestRPATH test from
+# https://github.com/pytorch/pytorch/pull/87593 is accepted, since it is then checked as part of the PyTorch test suite
+local_libcaffe2 = "$EBROOTPYTORCH/lib/python%%(pyshortver)s/site-packages/torch/lib/libcaffe2_nvrtc.%s" % SHLIB_EXT
+sanity_check_commands = [
+    "readelf -d %s | egrep 'RPATH|RUNPATH' | grep -v stubs" % local_libcaffe2,
+]
+
 # Especially test_quantization has a few corner cases that are triggered by the random input values,
 # those cannot be easily avoided, see https://github.com/pytorch/pytorch/issues/107030
 # So allow a low number of tests to fail as the tests "usually" succeed
Diff against PyTorch-2.1.2-foss-2023a-CUDA-12.1.1.eb

easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023a-CUDA-12.1.1.eb

diff --git a/easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023a-CUDA-12.1.1.eb b/easybuild/easyconfigs/p/PyTorch/PyTorch-1.13.1-foss-2022b-CUDA-12.0.0.eb
index 65dfced170..95b774a07b 100644
--- a/easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023a-CUDA-12.1.1.eb
+++ b/easybuild/easyconfigs/p/PyTorch/PyTorch-1.13.1-foss-2022b-CUDA-12.0.0.eb
@@ -1,195 +1,155 @@
 name = 'PyTorch'
-version = '2.1.2'
+version = '1.13.1'
 versionsuffix = '-CUDA-%(cudaver)s'
 
 homepage = 'https://pytorch.org/'
 description = """Tensors and Dynamic neural networks in Python with strong GPU acceleration.
 PyTorch is a deep learning framework that puts Python first."""
 
-toolchain = {'name': 'foss', 'version': '2023a'}
+toolchain = {'name': 'foss', 'version': '2022b'}
 
 source_urls = [GITHUB_RELEASE]
 sources = ['%(namelower)s-v%(version)s.tar.gz']
 patches = [
     'PyTorch-1.7.0_disable-dev-shm-test.patch',
+    'PyTorch-1.10.0_fix-kineto-crash.patch',
+    'PyTorch-1.11.0_fix-fp16-quantization-without-fbgemm.patch',
     'PyTorch-1.11.1_skip-test_init_from_local_shards.patch',
+    'PyTorch-1.12.0_fix-EmbeddingBag-without-fbgemm.patch',
     'PyTorch-1.12.1_add-hypothesis-suppression.patch',
+    'PyTorch-1.12.1_fix-skip-decorators.patch',
     'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch',
+    'PyTorch-1.12.1_fix-test_wishart_log_prob.patch',
     'PyTorch-1.12.1_fix-TestTorch.test_to.patch',
+    'PyTorch-1.12.1_fix-use-after-free-in-tensorpipe-agent.patch',
+    'PyTorch-1.12.1_fix-vsx-loadu.patch',
+    'PyTorch-1.12.1_fix-vsx-vector-funcs.patch',
     'PyTorch-1.12.1_skip-test_round_robin.patch',
+    'PyTorch-1.13.1_add-cuda12-compat.patch',
+    'PyTorch-1.13.1_disable-test-sharding.patch',
+    'PyTorch-1.13.1_fix-flaky-jit-test.patch',
+    'PyTorch-1.13.1_fix-fsdp-fp16-test.patch',
+    'PyTorch-1.13.1_fix-fsdp-tp-integration-test.patch',
+    'PyTorch-1.13.1_fix-gcc-12-missing-includes.patch',
     'PyTorch-1.13.1_fix-gcc-12-warning-in-fbgemm.patch',
+    'PyTorch-1.13.1_fix-kineto-crash-on-exit.patch',
+    'PyTorch-1.13.1_fix-numpy-deprecations.patch',
     'PyTorch-1.13.1_fix-protobuf-dependency.patch',
+    'PyTorch-1.13.1_fix-pytest-args.patch',
+    'PyTorch-1.13.1_fix-python-3.11-compat.patch',
+    'PyTorch-1.13.1_fix-test-ops-conf.patch',
     'PyTorch-1.13.1_fix-warning-in-test-cpp-api.patch',
+    'PyTorch-1.13.1_fix-wrong-check-in-fsdp-tests.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_jit.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_ops.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_optim.patch',
+    'PyTorch-1.13.1_install-vsx-vec-headers.patch',
+    'PyTorch-1.13.1_no-cuda-stubs-rpath.patch',
+    'PyTorch-1.13.1_remove-flaky-test-in-testnn.patch',
+    'PyTorch-1.13.1_skip-failing-grad-test.patch',
     'PyTorch-1.13.1_skip-failing-singular-grad-test.patch',
+    'PyTorch-1.13.1_skip-test-requiring-online-access.patch',
     'PyTorch-1.13.1_skip-tests-without-fbgemm.patch',
-    'PyTorch-2.0.1_avoid-test_quantization-failures.patch',
-    'PyTorch-2.0.1_fix-skip-decorators.patch',
-    'PyTorch-2.0.1_fix-ub-in-inductor-codegen.patch',
-    'PyTorch-2.0.1_fix-vsx-loadu.patch',
-    'PyTorch-2.0.1_no-cuda-stubs-rpath.patch',
-    'PyTorch-2.0.1_skip-failing-gradtest.patch',
-    'PyTorch-2.0.1_skip-test_shuffle_reproducibility.patch',
-    'PyTorch-2.0.1_skip-tests-skipped-in-subprocess.patch',
-    'PyTorch-2.1.0_disable-gcc12-warning.patch',
-    'PyTorch-2.1.0_disable-cudnn-tf32-for-too-strict-tests.patch',
-    'PyTorch-2.1.0_fix-bufferoverflow-in-oneDNN.patch',
-    'PyTorch-2.1.0_fix-test_numpy_torch_operators.patch',
-    'PyTorch-2.1.0_fix-validationError-output-test.patch',
-    'PyTorch-2.1.0_fix-vsx-vector-shift-functions.patch',
-    'PyTorch-2.1.0_increase-tolerance-functorch-test_vmapvjpvjp.patch',
-    'PyTorch-2.1.0_remove-sparse-csr-nnz-overflow-test.patch',
-    'PyTorch-2.1.0_remove-test-requiring-online-access.patch',
-    'PyTorch-2.1.0_skip-diff-test-on-ppc.patch',
-    'PyTorch-2.1.0_skip-dynamo-test_predispatch.patch',
-    'PyTorch-2.1.0_skip-test_jvp_linalg_det_singular.patch',
-    'PyTorch-2.1.0_skip-test_linear_fp32-without-MKL.patch',
-    'PyTorch-2.1.0_skip-test_wrap_bad.patch',
-    'PyTorch-2.1.2_add-cuda-skip-markers.patch',
-    'PyTorch-2.1.2_fix-conj-mismatch-test-failures.patch',
-    'PyTorch-2.1.2_fix-device-mesh-check.patch',
-    'PyTorch-2.1.2_fix-locale-issue-in-nvrtcCompileProgram.patch',
-    'PyTorch-2.1.2_fix-test_extension_backend-without-vectorization.patch',
-    'PyTorch-2.1.2_fix-test_memory_profiler.patch',
-    'PyTorch-2.1.2_fix-test_torchinductor-rounding.patch',
-    'PyTorch-2.1.2_fix-vsx-vector-abs.patch',
-    'PyTorch-2.1.2_fix-vsx-vector-div.patch',
-    'PyTorch-2.1.2_fix-with_temp_dir-decorator.patch',
-    'PyTorch-2.1.2_fix-wrong-device-mesh-size-in-tests.patch',
-    'PyTorch-2.1.2_relax-cuda-tolerances.patch',
-    'PyTorch-2.1.2_remove-nccl-backend-default-without-gpus.patch',
-    'PyTorch-2.1.2_skip-cpu_repro-test-without-vectorization.patch',
-    'PyTorch-2.1.2_skip-failing-test_dtensor_ops-subtests.patch',
-    'PyTorch-2.1.2_skip-memory-leak-test.patch',
-    'PyTorch-2.1.2_skip-test_fsdp_tp_checkpoint_integration.patch',
-    'PyTorch-2.1.2_workaround_dynamo_failure_without_nnpack.patch',
+    'PyTorch-1.13.1_skip-test_wrap_bad.patch',
 ]
 checksums = [
-    {'pytorch-v2.1.2.tar.gz': '85effbcce037bffa290aea775c9a4bad5f769cb229583450c40055501ee1acd7'},
+    {'pytorch-v1.13.1.tar.gz': 'dbc229ee9750b02b514937d017744443a269ea0241ed3f32b9af0703589d25d4'},
     {'PyTorch-1.7.0_disable-dev-shm-test.patch': '622cb1eaeadc06e13128a862d9946bcc1f1edd3d02b259c56a9aecc4d5406b8a'},
+    {'PyTorch-1.10.0_fix-kineto-crash.patch': 'dc467333b28162149af8f675929d8c6bf219f23230bfc0d39af02ba4f6f882eb'},
+    {'PyTorch-1.11.0_fix-fp16-quantization-without-fbgemm.patch':
+     'cc526130b6446bbbf5f0f7372d3aeee3e7d4c4d6e471524dff028b430b152934'},
     {'PyTorch-1.11.1_skip-test_init_from_local_shards.patch':
      '4aeb1b0bc863d4801b0095cbce69f8794066748f0df27c6aaaf729c5ecba04b7'},
+    {'PyTorch-1.12.0_fix-EmbeddingBag-without-fbgemm.patch':
+     '090598592283e3fc46ee08a68b6a6afe07be41b26514afba51834408bf1c98ed'},
     {'PyTorch-1.12.1_add-hypothesis-suppression.patch':
      'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c'},
+    {'PyTorch-1.12.1_fix-skip-decorators.patch': 'e3ca6e42b2fa592ea095939fb59ab875668a058479407db3f3684cc5c6f4146c'},
     {'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch':
      '1efc9850c431d702e9117d4766277d3f88c5c8b3870997c9974971bce7f2ab83'},
+    {'PyTorch-1.12.1_fix-test_wishart_log_prob.patch':
+     'cf475ae6e6234b96c8d1bf917597c5176c94b3ccd940b72f2e1cd0c979580f45'},
     {'PyTorch-1.12.1_fix-TestTorch.test_to.patch': '75f27987c3f25c501e719bd2b1c70a029ae0ee28514a97fe447516aee02b1535'},
+    {'PyTorch-1.12.1_fix-use-after-free-in-tensorpipe-agent.patch':
+     '0bd7e88b92c4c6f0fecf01746009858ba19f2df68b10b88c41485328a531875d'},
+    {'PyTorch-1.12.1_fix-vsx-loadu.patch': '8bfe3c94ada1dd1f7974a1261a8b576fb7ae944050fa1c7830fca033831123b2'},
+    {'PyTorch-1.12.1_fix-vsx-vector-funcs.patch': 'caccbf60f62eac313896c1eaec78b08f5d0fdfcb907079087490bb13d1561aa2'},
     {'PyTorch-1.12.1_skip-test_round_robin.patch': '63d4849b78605aa088fdff695637d9473ea60dee603a3ff7f788690d70c55349'},
+    {'PyTorch-1.13.1_add-cuda12-compat.patch': 'ceb0f9b28736982a1d7ced603f606bbbe87846b3d0224547df9ab6bb51429992'},
+    {'PyTorch-1.13.1_disable-test-sharding.patch': 'df2074adeba47998ce2993d99ca64eb6f1c79ab7057f553b436efdec264d3572'},
+    {'PyTorch-1.13.1_fix-flaky-jit-test.patch': '71efdeb29b5e5b4982c9f5cb2182733654a34d52f85bb5487bc4d7d99b86101b'},
+    {'PyTorch-1.13.1_fix-fsdp-fp16-test.patch': '8ae68e60d6e1f92f50322b7f0381c7e65251fba32d7606e3a238a36a2f55b5cf'},
+    {'PyTorch-1.13.1_fix-fsdp-tp-integration-test.patch':
+     '31e2d63b54ae1a8c554575f46db79bf8bbda851b6ca0ffe623c4911207a3c2bc'},
+    {'PyTorch-1.13.1_fix-gcc-12-missing-includes.patch':
+     '18df8c61ecaa9fb659346c1e172828bca6b069f0145bb8f6a36b0a23b7bef0a6'},
     {'PyTorch-1.13.1_fix-gcc-12-warning-in-fbgemm.patch':
      '5c7be91a6096083a0b1315efe0001537499c600f1f569953c6a2c7f4cc1d0910'},
+    {'PyTorch-1.13.1_fix-kineto-crash-on-exit.patch':
+     'f1e6808ee8d91a2ad76e0caedb4685e5aec3008d5e2e3c3c3e88cbb25cbd71b4'},
+    {'PyTorch-1.13.1_fix-numpy-deprecations.patch': 'f461b570efe0434ddd806bf2fa7020eb213e3ed89d0eb4403e076f4276ba2a46'},
     {'PyTorch-1.13.1_fix-protobuf-dependency.patch':
      '8bd755a0cab7233a243bc65ca57c9630dfccdc9bf8c9792f0de4e07a644fcb00'},
+    {'PyTorch-1.13.1_fix-pytest-args.patch': 'd3e3c841cf8d73683750f29326f2be56ee0bb5df7ff522baf7d7c3f301a91ec2'},
+    {'PyTorch-1.13.1_fix-python-3.11-compat.patch': 'fa4eb0e27e00a90bb217b77c0023089c4659c03f37d781ab4a681bdcb4f0432f'},
+    {'PyTorch-1.13.1_fix-test-ops-conf.patch': 'df652eec7753864ebebbfeca546929a53e3fb8f24259d5c9b964266a8551198c'},
     {'PyTorch-1.13.1_fix-warning-in-test-cpp-api.patch':
      'bdde0f2105215c95a54de64ec4b1a4520528510663174fef6d5b900eb1db3937'},
+    {'PyTorch-1.13.1_fix-wrong-check-in-fsdp-tests.patch':
+     'cbb5ca9ad668a504a456a2cc02d7254b79ddfd9a971a1648f0508fb103a9fc89'},
+    {'PyTorch-1.13.1_increase-tolerance-test_jit.patch':
+     'b97913754a0ae0887b8137db0b0d57caff8c3d7bd96fe555ea27ea01ff14527a'},
+    {'PyTorch-1.13.1_increase-tolerance-test_ops.patch':
+     'c909fdfc2b12df457e1eb5514265ffec3eab653994949416f3f048668421e223'},
+    {'PyTorch-1.13.1_increase-tolerance-test_optim.patch':
+     'a079d824085eab89794f5ecfc67792f735ed8cfd3fe7db52e4dea62e583cfe06'},
+    {'PyTorch-1.13.1_install-vsx-vec-headers.patch':
+     '7b678f54bb947afd4767f5877ac424b4b94ce5db609ea20f5a869ccf4027035f'},
+    {'PyTorch-1.13.1_no-cuda-stubs-rpath.patch': '4c636059850fc9d1ecb27ce275f8aad5d5b6fdc19e35aff0c25b86cb3201352a'},
+    {'PyTorch-1.13.1_remove-flaky-test-in-testnn.patch':
+     'be83ff61fe2dedab6d49c232936d5622df81ab49154264490021c6c828e53315'},
+    {'PyTorch-1.13.1_skip-failing-grad-test.patch': '6681200f9509893cb9231b5c93ac9bc5e6d9d9ae4febefca52e7cbc843ba8f51'},
     {'PyTorch-1.13.1_skip-failing-singular-grad-test.patch':
      '72688a57b2bb617665ad1a1d5e362c5111ae912c10936bb38a089c0204729f48'},
+    {'PyTorch-1.13.1_skip-test-requiring-online-access.patch':
+     '61c3b7859dc06a9969981b07aa2789630de110d6d1d3633d27364be47af74712'},
     {'PyTorch-1.13.1_skip-tests-without-fbgemm.patch':
      '481e595f673baf8ae58b41697a6792b83048b0264aa79b422f48cd8c22948bb7'},
-    {'PyTorch-2.0.1_avoid-test_quantization-failures.patch':
-     '02e3f47e4ed1d7d6077e26f1ae50073dc2b20426269930b505f4aefe5d2f33cd'},
-    {'PyTorch-2.0.1_fix-skip-decorators.patch': '2039012cef45446065e1a2097839fe20bb29fe3c1dcc926c3695ebf29832e920'},
-    {'PyTorch-2.0.1_fix-ub-in-inductor-codegen.patch':
-     '1b37194f55ae678f3657b8728dfb896c18ffe8babe90987ce468c4fa9274f357'},
-    {'PyTorch-2.0.1_fix-vsx-loadu.patch': 'a0ffa61da2d47c6acd09aaf6d4791e527d8919a6f4f1aa7ed38454cdcadb1f72'},
-    {'PyTorch-2.0.1_no-cuda-stubs-rpath.patch': '8902e58a762240f24cdbf0182e99ccdfc2a93492869352fcb4ca0ec7e407f83a'},
-    {'PyTorch-2.0.1_skip-failing-gradtest.patch': '8030bdec6ba49b057ab232d19a7f1a5e542e47e2ec340653a246ec9ed59f8bc1'},
-    {'PyTorch-2.0.1_skip-test_shuffle_reproducibility.patch':
-     '7047862abc1abaff62954da59700f36d4f39fcf83167a638183b1b7f8fec78ae'},
-    {'PyTorch-2.0.1_skip-tests-skipped-in-subprocess.patch':
-     '166c134573a95230e39b9ea09ece3ad8072f39d370c9a88fb2a1e24f6aaac2b5'},
-    {'PyTorch-2.1.0_disable-gcc12-warning.patch': 'c858b8db0010f41005dc06f9a50768d0d3dc2d2d499ccbdd5faf8a518869a421'},
-    {'PyTorch-2.1.0_disable-cudnn-tf32-for-too-strict-tests.patch':
-     'd895018ebdfd46e65d9f7645444a3b4c5bbfe3d533a08db559a04be34e01e478'},
-    {'PyTorch-2.1.0_fix-bufferoverflow-in-oneDNN.patch':
-     'b15b1291a3c37bf6a4982cfbb3483f693acb46a67bc0912b383fd98baf540ccf'},
-    {'PyTorch-2.1.0_fix-test_numpy_torch_operators.patch':
-     '84bb51a719abc677031a7a3dfe4382ff098b0cbd8b39b8bed2a7fa03f80ac1e9'},
-    {'PyTorch-2.1.0_fix-validationError-output-test.patch':
-     '7eba0942afb121ed92fac30d1529447d892a89eb3d53c565f8e9d480e95f692b'},
-    {'PyTorch-2.1.0_fix-vsx-vector-shift-functions.patch':
-     '3793b4b878be1abe7791efcbd534774b87862cfe7dc4774ca8729b6cabb39e7e'},
-    {'PyTorch-2.1.0_increase-tolerance-functorch-test_vmapvjpvjp.patch':
-     'aef38adf1210d0c5455e91d7c7a9d9e5caad3ae568301e0ba9fc204309438e7b'},
-    {'PyTorch-2.1.0_remove-sparse-csr-nnz-overflow-test.patch':
-     '0ac36411e76506b3354c85a8a1260987f66af947ee52ffc64230aee1fa02ea8b'},
-    {'PyTorch-2.1.0_remove-test-requiring-online-access.patch':
-     '35184b8c5a1b10f79e511cc25db3b8a5585a5d58b5d1aa25dd3d250200b14fd7'},
-    {'PyTorch-2.1.0_skip-diff-test-on-ppc.patch': '394157dbe565ffcbc1821cd63d05930957412156cc01e949ef3d3524176a1dda'},
-    {'PyTorch-2.1.0_skip-dynamo-test_predispatch.patch':
-     '6298daf9ddaa8542850eee9ea005f28594ab65b1f87af43d8aeca1579a8c4354'},
-    {'PyTorch-2.1.0_skip-test_jvp_linalg_det_singular.patch':
-     '5229ca88a71db7667a90ddc0b809b2c817698bd6e9c5aaabd73d3173cf9b99fe'},
-    {'PyTorch-2.1.0_skip-test_linear_fp32-without-MKL.patch':
-     '5dcc79883b6e3ec0a281a8e110db5e0a5880de843bb05653589891f16473ead5'},
-    {'PyTorch-2.1.0_skip-test_wrap_bad.patch': 'b8583125ee94e553b6f77c4ab4bfa812b89416175dc7e9b7390919f3b485cb63'},
-    {'PyTorch-2.1.2_add-cuda-skip-markers.patch': 'd007d6d0cdb533e7d01f503e9055218760123a67c1841c57585385144be18c9a'},
-    {'PyTorch-2.1.2_fix-conj-mismatch-test-failures.patch':
-     'c164357efa4ce88095376e590ba508fc1daa87161e1e59544eda56daac7f2847'},
-    {'PyTorch-2.1.2_fix-device-mesh-check.patch': 'c0efc288bf3d9a9a3c8bbd2691348a589a2677ea43880a8c987db91c8de4806b'},
-    {'PyTorch-2.1.2_fix-locale-issue-in-nvrtcCompileProgram.patch':
-     'f7adafb4e4d3b724b93237a259797b6ed6f535f83be0e34a7b759c71c6a8ddf2'},
-    {'PyTorch-2.1.2_fix-test_extension_backend-without-vectorization.patch':
-     'cd1455495886a7d6b2d30d48736eb0103fded21e2e36de6baac719b9c52a1c92'},
-    {'PyTorch-2.1.2_fix-test_memory_profiler.patch':
-     '30b0c9355636c0ab3dedae02399789053825dc3835b4d7dac6e696767772b1ce'},
-    {'PyTorch-2.1.2_fix-test_torchinductor-rounding.patch':
-     'a0ef99192ee2ad1509c78a8377023d5be2b5fddb16f84063b7c9a0b53d979090'},
-    {'PyTorch-2.1.2_fix-vsx-vector-abs.patch': 'd67d32407faed7dc1dbab4bba0e2f7de36c3db04560ced35c94caf8d84ade886'},
-    {'PyTorch-2.1.2_fix-vsx-vector-div.patch': '11f497a6892eb49b249a15320e4218e0d7ac8ae4ce67de39e4a018a064ca1acc'},
-    {'PyTorch-2.1.2_fix-with_temp_dir-decorator.patch':
-     '90bd001e034095329277d70c6facc4026b4ce6d7f8b8d6aa81c0176eeb462eb1'},
-    {'PyTorch-2.1.2_fix-wrong-device-mesh-size-in-tests.patch':
-     '07a5e4233d02fb6348872838f4d69573c777899c6f0ea4e39ae23c08660d41e5'},
-    {'PyTorch-2.1.2_relax-cuda-tolerances.patch': '554ad09787f61080fafdb84216e711e32327aa357e2a9c40bb428eb6503dee6e'},
-    {'PyTorch-2.1.2_remove-nccl-backend-default-without-gpus.patch':
-     'e6a1efe3d127fcbf4723476a7a1c01cfcf2ccb16d1fb250f478192623e8b6a15'},
-    {'PyTorch-2.1.2_skip-cpu_repro-test-without-vectorization.patch':
-     '7ace835af60c58d9e0754a34c19d4b9a0c3a531f19e5d0eba8e2e49206eaa7eb'},
-    {'PyTorch-2.1.2_skip-failing-test_dtensor_ops-subtests.patch':
-     '6cf711bf26518550903b09ed4431de9319791e79d61aab065785d6608fd5cc88'},
-    {'PyTorch-2.1.2_skip-memory-leak-test.patch': '8d9841208e8a00a498295018aead380c360cf56e500ef23ca740adb5b36de142'},
-    {'PyTorch-2.1.2_skip-test_fsdp_tp_checkpoint_integration.patch':
-     '943ee92f5fd518f608a59e43fe426b9bb45d7e7ad0ba04639e516db2d61fa57d'},
-    {'PyTorch-2.1.2_workaround_dynamo_failure_without_nnpack.patch':
-     'fb96eefabf394617bbb3fbd3a7a7c1aa5991b3836edc2e5d2a30e708bfe49ba1'},
+    {'PyTorch-1.13.1_skip-test_wrap_bad.patch': 'c97e2b7369e4618ab7d0ef81002bc6147db1b713197766aacd1ca16f0fbb1ced'},
 ]
 
 osdependencies = [OS_PKG_IBVERBS_DEV]
 
 builddependencies = [
-    ('CMake', '3.26.3'),
-    ('hypothesis', '6.82.0'),
+    ('CMake', '3.24.3'),
+    ('hypothesis', '6.68.2'),
     # For tests
-    ('pytest-flakefinder', '1.1.0'),
     ('pytest-rerunfailures', '12.0'),
     ('pytest-shard', '0.1.2'),
+    ('unittest-xml-reporting', '3.1.0'),
 ]
 
 dependencies = [
-    ('CUDA', '12.1.1', '', SYSTEM),
-    ('cuDNN', '8.9.2.26', '-CUDA-%(cudaver)s', SYSTEM),
-    ('magma', '2.7.2', '-CUDA-%(cudaver)s'),
-    ('NCCL', '2.18.3', '-CUDA-%(cudaver)s'),
+    ('CUDA', '12.0.0', '', SYSTEM),
     ('Ninja', '1.11.1'),  # Required for JIT compilation of C++ extensions
-    ('Python', '3.11.3'),
-    ('Python-bundle-PyPI', '2023.06'),
-    ('protobuf', '24.0'),
-    ('protobuf-python', '4.24.0'),
-    ('pybind11', '2.11.1'),
-    ('SciPy-bundle', '2023.07'),
+    ('Python', '3.10.8'),
+    ('protobuf', '23.0'),
+    ('protobuf-python', '4.23.0'),
+    ('pybind11', '2.10.3'),
+    ('SciPy-bundle', '2023.02'),
     ('PyYAML', '6.0'),
     ('MPFR', '4.2.0'),
     ('GMP', '6.2.1'),
     ('numactl', '2.0.16'),
-    ('FFmpeg', '6.0'),
-    ('Pillow', '10.0.0'),
-    ('expecttest', '0.1.5'),
-    ('networkx', '3.1'),
-    ('sympy', '1.12'),
-    ('Z3', '4.12.2'),
+    ('FFmpeg', '5.1.2'),
+    ('Pillow', '9.4.0'),
+    ('cuDNN', '8.8.0.121', '-CUDA-%(cudaver)s', SYSTEM),
+    ('magma', '2.7.1', '-CUDA-%(cudaver)s'),
+    ('NCCL', '2.16.2', '-CUDA-%(cudaver)s'),
+    ('expecttest', '0.1.3'),
 ]
 
-use_pip = True
-buildcmd = '%(python)s setup.py build'  # Run the (long) build in the build step
+custom_opts = ['CMAKE_CXX_STANDARD=17']
 
 excluded_tests = {
     '': [
@@ -205,34 +165,23 @@ excluded_tests = {
         # intermittent failures on various systems
         # See https://github.com/easybuilders/easybuild-easyconfigs/issues/17712
         'distributed/rpc/test_tensorpipe_agent',
-        # Broken test, can't ever succeed, see https://github.com/pytorch/pytorch/issues/122184
-        'distributed/tensor/parallel/test_tp_random_state',
-        # failures on OmniPath systems, which don't support some optional InfiniBand features
-        # See https://github.com/pytorch/tensorpipe/issues/413
-        'distributed/pipeline/sync/skip/test_gpipe',
-        'distributed/pipeline/sync/skip/test_leak',
-        'distributed/pipeline/sync/test_bugs',
-        'distributed/pipeline/sync/test_inplace',
-        'distributed/pipeline/sync/test_pipe',
-        'distributed/pipeline/sync/test_transparency',
     ]
 }
 
 runtest = 'cd test && PYTHONUNBUFFERED=1 %(python)s run_test.py --continue-through-error  --verbose %(excluded_tests)s'
 
-# Especially test_quantization has a few corner cases that are triggered by the random input values,
-# those cannot be easily avoided, see https://github.com/pytorch/pytorch/issues/107030
-# test_nn is also prone to spurious failures: https://github.com/pytorch/pytorch/issues/118294
-# So allow a low number of tests to fail as the tests "usually" succeed
-max_failed_tests = 2
-
 # The readelf sanity check command can be taken out once the TestRPATH test from
-# https://github.com/pytorch/pytorch/pull/109493 is accepted, since it is then checked as part of the PyTorch test suite
+# https://github.com/pytorch/pytorch/pull/87593 is accepted, since it is then checked as part of the PyTorch test suite
 local_libcaffe2 = "$EBROOTPYTORCH/lib/python%%(pyshortver)s/site-packages/torch/lib/libcaffe2_nvrtc.%s" % SHLIB_EXT
 sanity_check_commands = [
     "readelf -d %s | egrep 'RPATH|RUNPATH' | grep -v stubs" % local_libcaffe2,
 ]
 
+# Especially test_quantization has a few corner cases that are triggered by the random input values,
+# those cannot be easily avoided, see https://github.com/pytorch/pytorch/issues/107030
+# So allow a low number of tests to fail as the tests "usually" succeed
+max_failed_tests = 2
+
 tests = ['PyTorch-check-cpp-extension.py']
 
 moduleclass = 'ai'
Diff against PyTorch-2.1.2-foss-2023a.eb

easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023a.eb

diff --git a/easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023a.eb b/easybuild/easyconfigs/p/PyTorch/PyTorch-1.13.1-foss-2022b-CUDA-12.0.0.eb
index a79f709480..95b774a07b 100644
--- a/easybuild/easyconfigs/p/PyTorch/PyTorch-2.1.2-foss-2023a.eb
+++ b/easybuild/easyconfigs/p/PyTorch/PyTorch-1.13.1-foss-2022b-CUDA-12.0.0.eb
@@ -1,159 +1,155 @@
 name = 'PyTorch'
-version = '2.1.2'
+version = '1.13.1'
+versionsuffix = '-CUDA-%(cudaver)s'
 
 homepage = 'https://pytorch.org/'
 description = """Tensors and Dynamic neural networks in Python with strong GPU acceleration.
 PyTorch is a deep learning framework that puts Python first."""
 
-toolchain = {'name': 'foss', 'version': '2023a'}
+toolchain = {'name': 'foss', 'version': '2022b'}
 
 source_urls = [GITHUB_RELEASE]
 sources = ['%(namelower)s-v%(version)s.tar.gz']
 patches = [
     'PyTorch-1.7.0_disable-dev-shm-test.patch',
+    'PyTorch-1.10.0_fix-kineto-crash.patch',
+    'PyTorch-1.11.0_fix-fp16-quantization-without-fbgemm.patch',
     'PyTorch-1.11.1_skip-test_init_from_local_shards.patch',
+    'PyTorch-1.12.0_fix-EmbeddingBag-without-fbgemm.patch',
     'PyTorch-1.12.1_add-hypothesis-suppression.patch',
+    'PyTorch-1.12.1_fix-skip-decorators.patch',
     'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch',
+    'PyTorch-1.12.1_fix-test_wishart_log_prob.patch',
     'PyTorch-1.12.1_fix-TestTorch.test_to.patch',
+    'PyTorch-1.12.1_fix-use-after-free-in-tensorpipe-agent.patch',
+    'PyTorch-1.12.1_fix-vsx-loadu.patch',
+    'PyTorch-1.12.1_fix-vsx-vector-funcs.patch',
     'PyTorch-1.12.1_skip-test_round_robin.patch',
+    'PyTorch-1.13.1_add-cuda12-compat.patch',
+    'PyTorch-1.13.1_disable-test-sharding.patch',
+    'PyTorch-1.13.1_fix-flaky-jit-test.patch',
+    'PyTorch-1.13.1_fix-fsdp-fp16-test.patch',
+    'PyTorch-1.13.1_fix-fsdp-tp-integration-test.patch',
+    'PyTorch-1.13.1_fix-gcc-12-missing-includes.patch',
     'PyTorch-1.13.1_fix-gcc-12-warning-in-fbgemm.patch',
+    'PyTorch-1.13.1_fix-kineto-crash-on-exit.patch',
+    'PyTorch-1.13.1_fix-numpy-deprecations.patch',
     'PyTorch-1.13.1_fix-protobuf-dependency.patch',
+    'PyTorch-1.13.1_fix-pytest-args.patch',
+    'PyTorch-1.13.1_fix-python-3.11-compat.patch',
+    'PyTorch-1.13.1_fix-test-ops-conf.patch',
     'PyTorch-1.13.1_fix-warning-in-test-cpp-api.patch',
+    'PyTorch-1.13.1_fix-wrong-check-in-fsdp-tests.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_jit.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_ops.patch',
+    'PyTorch-1.13.1_increase-tolerance-test_optim.patch',
+    'PyTorch-1.13.1_install-vsx-vec-headers.patch',
+    'PyTorch-1.13.1_no-cuda-stubs-rpath.patch',
+    'PyTorch-1.13.1_remove-flaky-test-in-testnn.patch',
+    'PyTorch-1.13.1_skip-failing-grad-test.patch',
     'PyTorch-1.13.1_skip-failing-singular-grad-test.patch',
+    'PyTorch-1.13.1_skip-test-requiring-online-access.patch',
     'PyTorch-1.13.1_skip-tests-without-fbgemm.patch',
-    'PyTorch-2.0.1_avoid-test_quantization-failures.patch',
-    'PyTorch-2.0.1_fix-skip-decorators.patch',
-    'PyTorch-2.0.1_fix-ub-in-inductor-codegen.patch',
-    'PyTorch-2.0.1_fix-vsx-loadu.patch',
-    'PyTorch-2.0.1_no-cuda-stubs-rpath.patch',
-    'PyTorch-2.0.1_skip-failing-gradtest.patch',
-    'PyTorch-2.0.1_skip-test_shuffle_reproducibility.patch',
-    'PyTorch-2.0.1_skip-tests-skipped-in-subprocess.patch',
-    'PyTorch-2.1.0_disable-gcc12-warning.patch',
-    'PyTorch-2.1.0_fix-bufferoverflow-in-oneDNN.patch',
-    'PyTorch-2.1.0_fix-test_numpy_torch_operators.patch',
-    'PyTorch-2.1.0_fix-validationError-output-test.patch',
-    'PyTorch-2.1.0_fix-vsx-vector-shift-functions.patch',
-    'PyTorch-2.1.0_increase-tolerance-functorch-test_vmapvjpvjp.patch',
-    'PyTorch-2.1.0_remove-sparse-csr-nnz-overflow-test.patch',
-    'PyTorch-2.1.0_remove-test-requiring-online-access.patch',
-    'PyTorch-2.1.0_skip-diff-test-on-ppc.patch',
-    'PyTorch-2.1.0_skip-dynamo-test_predispatch.patch',
-    'PyTorch-2.1.0_skip-test_jvp_linalg_det_singular.patch',
-    'PyTorch-2.1.0_skip-test_linear_fp32-without-MKL.patch',
-    'PyTorch-2.1.0_skip-test_wrap_bad.patch',
-    'PyTorch-2.1.2_fix-test_extension_backend-without-vectorization.patch',
-    'PyTorch-2.1.2_fix-test_memory_profiler.patch',
-    'PyTorch-2.1.2_fix-test_torchinductor-rounding.patch',
-    'PyTorch-2.1.2_fix-vsx-vector-abs.patch',
-    'PyTorch-2.1.2_fix-vsx-vector-div.patch',
-    'PyTorch-2.1.2_skip-cpu_repro-test-without-vectorization.patch',
-    'PyTorch-2.1.2_skip-memory-leak-test.patch',
-    'PyTorch-2.1.2_workaround_dynamo_failure_without_nnpack.patch',
+    'PyTorch-1.13.1_skip-test_wrap_bad.patch',
 ]
 checksums = [
-    {'pytorch-v2.1.2.tar.gz': '85effbcce037bffa290aea775c9a4bad5f769cb229583450c40055501ee1acd7'},
+    {'pytorch-v1.13.1.tar.gz': 'dbc229ee9750b02b514937d017744443a269ea0241ed3f32b9af0703589d25d4'},
     {'PyTorch-1.7.0_disable-dev-shm-test.patch': '622cb1eaeadc06e13128a862d9946bcc1f1edd3d02b259c56a9aecc4d5406b8a'},
+    {'PyTorch-1.10.0_fix-kineto-crash.patch': 'dc467333b28162149af8f675929d8c6bf219f23230bfc0d39af02ba4f6f882eb'},
+    {'PyTorch-1.11.0_fix-fp16-quantization-without-fbgemm.patch':
+     'cc526130b6446bbbf5f0f7372d3aeee3e7d4c4d6e471524dff028b430b152934'},
     {'PyTorch-1.11.1_skip-test_init_from_local_shards.patch':
      '4aeb1b0bc863d4801b0095cbce69f8794066748f0df27c6aaaf729c5ecba04b7'},
+    {'PyTorch-1.12.0_fix-EmbeddingBag-without-fbgemm.patch':
+     '090598592283e3fc46ee08a68b6a6afe07be41b26514afba51834408bf1c98ed'},
     {'PyTorch-1.12.1_add-hypothesis-suppression.patch':
      'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c'},
+    {'PyTorch-1.12.1_fix-skip-decorators.patch': 'e3ca6e42b2fa592ea095939fb59ab875668a058479407db3f3684cc5c6f4146c'},
     {'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch':
      '1efc9850c431d702e9117d4766277d3f88c5c8b3870997c9974971bce7f2ab83'},
+    {'PyTorch-1.12.1_fix-test_wishart_log_prob.patch':
+     'cf475ae6e6234b96c8d1bf917597c5176c94b3ccd940b72f2e1cd0c979580f45'},
     {'PyTorch-1.12.1_fix-TestTorch.test_to.patch': '75f27987c3f25c501e719bd2b1c70a029ae0ee28514a97fe447516aee02b1535'},
+    {'PyTorch-1.12.1_fix-use-after-free-in-tensorpipe-agent.patch':
+     '0bd7e88b92c4c6f0fecf01746009858ba19f2df68b10b88c41485328a531875d'},
+    {'PyTorch-1.12.1_fix-vsx-loadu.patch': '8bfe3c94ada1dd1f7974a1261a8b576fb7ae944050fa1c7830fca033831123b2'},
+    {'PyTorch-1.12.1_fix-vsx-vector-funcs.patch': 'caccbf60f62eac313896c1eaec78b08f5d0fdfcb907079087490bb13d1561aa2'},
     {'PyTorch-1.12.1_skip-test_round_robin.patch': '63d4849b78605aa088fdff695637d9473ea60dee603a3ff7f788690d70c55349'},
+    {'PyTorch-1.13.1_add-cuda12-compat.patch': 'ceb0f9b28736982a1d7ced603f606bbbe87846b3d0224547df9ab6bb51429992'},
+    {'PyTorch-1.13.1_disable-test-sharding.patch': 'df2074adeba47998ce2993d99ca64eb6f1c79ab7057f553b436efdec264d3572'},
+    {'PyTorch-1.13.1_fix-flaky-jit-test.patch': '71efdeb29b5e5b4982c9f5cb2182733654a34d52f85bb5487bc4d7d99b86101b'},
+    {'PyTorch-1.13.1_fix-fsdp-fp16-test.patch': '8ae68e60d6e1f92f50322b7f0381c7e65251fba32d7606e3a238a36a2f55b5cf'},
+    {'PyTorch-1.13.1_fix-fsdp-tp-integration-test.patch':
+     '31e2d63b54ae1a8c554575f46db79bf8bbda851b6ca0ffe623c4911207a3c2bc'},
+    {'PyTorch-1.13.1_fix-gcc-12-missing-includes.patch':
+     '18df8c61ecaa9fb659346c1e172828bca6b069f0145bb8f6a36b0a23b7bef0a6'},
     {'PyTorch-1.13.1_fix-gcc-12-warning-in-fbgemm.patch':
      '5c7be91a6096083a0b1315efe0001537499c600f1f569953c6a2c7f4cc1d0910'},
+    {'PyTorch-1.13.1_fix-kineto-crash-on-exit.patch':
+     'f1e6808ee8d91a2ad76e0caedb4685e5aec3008d5e2e3c3c3e88cbb25cbd71b4'},
+    {'PyTorch-1.13.1_fix-numpy-deprecations.patch': 'f461b570efe0434ddd806bf2fa7020eb213e3ed89d0eb4403e076f4276ba2a46'},
     {'PyTorch-1.13.1_fix-protobuf-dependency.patch':
      '8bd755a0cab7233a243bc65ca57c9630dfccdc9bf8c9792f0de4e07a644fcb00'},
+    {'PyTorch-1.13.1_fix-pytest-args.patch': 'd3e3c841cf8d73683750f29326f2be56ee0bb5df7ff522baf7d7c3f301a91ec2'},
+    {'PyTorch-1.13.1_fix-python-3.11-compat.patch': 'fa4eb0e27e00a90bb217b77c0023089c4659c03f37d781ab4a681bdcb4f0432f'},
+    {'PyTorch-1.13.1_fix-test-ops-conf.patch': 'df652eec7753864ebebbfeca546929a53e3fb8f24259d5c9b964266a8551198c'},
     {'PyTorch-1.13.1_fix-warning-in-test-cpp-api.patch':
      'bdde0f2105215c95a54de64ec4b1a4520528510663174fef6d5b900eb1db3937'},
+    {'PyTorch-1.13.1_fix-wrong-check-in-fsdp-tests.patch':
+     'cbb5ca9ad668a504a456a2cc02d7254b79ddfd9a971a1648f0508fb103a9fc89'},
+    {'PyTorch-1.13.1_increase-tolerance-test_jit.patch':
+     'b97913754a0ae0887b8137db0b0d57caff8c3d7bd96fe555ea27ea01ff14527a'},
+    {'PyTorch-1.13.1_increase-tolerance-test_ops.patch':
+     'c909fdfc2b12df457e1eb5514265ffec3eab653994949416f3f048668421e223'},
+    {'PyTorch-1.13.1_increase-tolerance-test_optim.patch':
+     'a079d824085eab89794f5ecfc67792f735ed8cfd3fe7db52e4dea62e583cfe06'},
+    {'PyTorch-1.13.1_install-vsx-vec-headers.patch':
+     '7b678f54bb947afd4767f5877ac424b4b94ce5db609ea20f5a869ccf4027035f'},
+    {'PyTorch-1.13.1_no-cuda-stubs-rpath.patch': '4c636059850fc9d1ecb27ce275f8aad5d5b6fdc19e35aff0c25b86cb3201352a'},
+    {'PyTorch-1.13.1_remove-flaky-test-in-testnn.patch':
+     'be83ff61fe2dedab6d49c232936d5622df81ab49154264490021c6c828e53315'},
+    {'PyTorch-1.13.1_skip-failing-grad-test.patch': '6681200f9509893cb9231b5c93ac9bc5e6d9d9ae4febefca52e7cbc843ba8f51'},
     {'PyTorch-1.13.1_skip-failing-singular-grad-test.patch':
      '72688a57b2bb617665ad1a1d5e362c5111ae912c10936bb38a089c0204729f48'},
+    {'PyTorch-1.13.1_skip-test-requiring-online-access.patch':
+     '61c3b7859dc06a9969981b07aa2789630de110d6d1d3633d27364be47af74712'},
     {'PyTorch-1.13.1_skip-tests-without-fbgemm.patch':
      '481e595f673baf8ae58b41697a6792b83048b0264aa79b422f48cd8c22948bb7'},
-    {'PyTorch-2.0.1_avoid-test_quantization-failures.patch':
-     '02e3f47e4ed1d7d6077e26f1ae50073dc2b20426269930b505f4aefe5d2f33cd'},
-    {'PyTorch-2.0.1_fix-skip-decorators.patch': '2039012cef45446065e1a2097839fe20bb29fe3c1dcc926c3695ebf29832e920'},
-    {'PyTorch-2.0.1_fix-ub-in-inductor-codegen.patch':
-     '1b37194f55ae678f3657b8728dfb896c18ffe8babe90987ce468c4fa9274f357'},
-    {'PyTorch-2.0.1_fix-vsx-loadu.patch': 'a0ffa61da2d47c6acd09aaf6d4791e527d8919a6f4f1aa7ed38454cdcadb1f72'},
-    {'PyTorch-2.0.1_no-cuda-stubs-rpath.patch': '8902e58a762240f24cdbf0182e99ccdfc2a93492869352fcb4ca0ec7e407f83a'},
-    {'PyTorch-2.0.1_skip-failing-gradtest.patch': '8030bdec6ba49b057ab232d19a7f1a5e542e47e2ec340653a246ec9ed59f8bc1'},
-    {'PyTorch-2.0.1_skip-test_shuffle_reproducibility.patch':
-     '7047862abc1abaff62954da59700f36d4f39fcf83167a638183b1b7f8fec78ae'},
-    {'PyTorch-2.0.1_skip-tests-skipped-in-subprocess.patch':
-     '166c134573a95230e39b9ea09ece3ad8072f39d370c9a88fb2a1e24f6aaac2b5'},
-    {'PyTorch-2.1.0_disable-gcc12-warning.patch': 'c858b8db0010f41005dc06f9a50768d0d3dc2d2d499ccbdd5faf8a518869a421'},
-    {'PyTorch-2.1.0_fix-bufferoverflow-in-oneDNN.patch':
-     'b15b1291a3c37bf6a4982cfbb3483f693acb46a67bc0912b383fd98baf540ccf'},
-    {'PyTorch-2.1.0_fix-test_numpy_torch_operators.patch':
-     '84bb51a719abc677031a7a3dfe4382ff098b0cbd8b39b8bed2a7fa03f80ac1e9'},
-    {'PyTorch-2.1.0_fix-validationError-output-test.patch':
-     '7eba0942afb121ed92fac30d1529447d892a89eb3d53c565f8e9d480e95f692b'},
-    {'PyTorch-2.1.0_fix-vsx-vector-shift-functions.patch':
-     '3793b4b878be1abe7791efcbd534774b87862cfe7dc4774ca8729b6cabb39e7e'},
-    {'PyTorch-2.1.0_increase-tolerance-functorch-test_vmapvjpvjp.patch':
-     'aef38adf1210d0c5455e91d7c7a9d9e5caad3ae568301e0ba9fc204309438e7b'},
-    {'PyTorch-2.1.0_remove-sparse-csr-nnz-overflow-test.patch':
-     '0ac36411e76506b3354c85a8a1260987f66af947ee52ffc64230aee1fa02ea8b'},
-    {'PyTorch-2.1.0_remove-test-requiring-online-access.patch':
-     '35184b8c5a1b10f79e511cc25db3b8a5585a5d58b5d1aa25dd3d250200b14fd7'},
-    {'PyTorch-2.1.0_skip-diff-test-on-ppc.patch': '394157dbe565ffcbc1821cd63d05930957412156cc01e949ef3d3524176a1dda'},
-    {'PyTorch-2.1.0_skip-dynamo-test_predispatch.patch':
-     '6298daf9ddaa8542850eee9ea005f28594ab65b1f87af43d8aeca1579a8c4354'},
-    {'PyTorch-2.1.0_skip-test_jvp_linalg_det_singular.patch':
-     '5229ca88a71db7667a90ddc0b809b2c817698bd6e9c5aaabd73d3173cf9b99fe'},
-    {'PyTorch-2.1.0_skip-test_linear_fp32-without-MKL.patch':
-     '5dcc79883b6e3ec0a281a8e110db5e0a5880de843bb05653589891f16473ead5'},
-    {'PyTorch-2.1.0_skip-test_wrap_bad.patch': 'b8583125ee94e553b6f77c4ab4bfa812b89416175dc7e9b7390919f3b485cb63'},
-    {'PyTorch-2.1.2_fix-test_extension_backend-without-vectorization.patch':
-     'cd1455495886a7d6b2d30d48736eb0103fded21e2e36de6baac719b9c52a1c92'},
-    {'PyTorch-2.1.2_fix-test_memory_profiler.patch':
-     '30b0c9355636c0ab3dedae02399789053825dc3835b4d7dac6e696767772b1ce'},
-    {'PyTorch-2.1.2_fix-test_torchinductor-rounding.patch':
-     'a0ef99192ee2ad1509c78a8377023d5be2b5fddb16f84063b7c9a0b53d979090'},
-    {'PyTorch-2.1.2_fix-vsx-vector-abs.patch': 'd67d32407faed7dc1dbab4bba0e2f7de36c3db04560ced35c94caf8d84ade886'},
-    {'PyTorch-2.1.2_fix-vsx-vector-div.patch': '11f497a6892eb49b249a15320e4218e0d7ac8ae4ce67de39e4a018a064ca1acc'},
-    {'PyTorch-2.1.2_skip-cpu_repro-test-without-vectorization.patch':
-     '7ace835af60c58d9e0754a34c19d4b9a0c3a531f19e5d0eba8e2e49206eaa7eb'},
-    {'PyTorch-2.1.2_skip-memory-leak-test.patch': '8d9841208e8a00a498295018aead380c360cf56e500ef23ca740adb5b36de142'},
-    {'PyTorch-2.1.2_workaround_dynamo_failure_without_nnpack.patch':
-     'fb96eefabf394617bbb3fbd3a7a7c1aa5991b3836edc2e5d2a30e708bfe49ba1'},
+    {'PyTorch-1.13.1_skip-test_wrap_bad.patch': 'c97e2b7369e4618ab7d0ef81002bc6147db1b713197766aacd1ca16f0fbb1ced'},
 ]
 
 osdependencies = [OS_PKG_IBVERBS_DEV]
 
 builddependencies = [
-    ('CMake', '3.26.3'),
-    ('hypothesis', '6.82.0'),
+    ('CMake', '3.24.3'),
+    ('hypothesis', '6.68.2'),
     # For tests
-    ('pytest-flakefinder', '1.1.0'),
     ('pytest-rerunfailures', '12.0'),
     ('pytest-shard', '0.1.2'),
+    ('unittest-xml-reporting', '3.1.0'),
 ]
 
 dependencies = [
+    ('CUDA', '12.0.0', '', SYSTEM),
     ('Ninja', '1.11.1'),  # Required for JIT compilation of C++ extensions
-    ('Python', '3.11.3'),
-    ('Python-bundle-PyPI', '2023.06'),
-    ('protobuf', '24.0'),
-    ('protobuf-python', '4.24.0'),
-    ('pybind11', '2.11.1'),
-    ('SciPy-bundle', '2023.07'),
+    ('Python', '3.10.8'),
+    ('protobuf', '23.0'),
+    ('protobuf-python', '4.23.0'),
+    ('pybind11', '2.10.3'),
+    ('SciPy-bundle', '2023.02'),
     ('PyYAML', '6.0'),
     ('MPFR', '4.2.0'),
     ('GMP', '6.2.1'),
     ('numactl', '2.0.16'),
-    ('FFmpeg', '6.0'),
-    ('Pillow', '10.0.0'),
-    ('expecttest', '0.1.5'),
-    ('networkx', '3.1'),
-    ('sympy', '1.12'),
-    ('Z3', '4.12.2',),
+    ('FFmpeg', '5.1.2'),
+    ('Pillow', '9.4.0'),
+    ('cuDNN', '8.8.0.121', '-CUDA-%(cudaver)s', SYSTEM),
+    ('magma', '2.7.1', '-CUDA-%(cudaver)s'),
+    ('NCCL', '2.16.2', '-CUDA-%(cudaver)s'),
+    ('expecttest', '0.1.3'),
 ]
 
-use_pip = True
+custom_opts = ['CMAKE_CXX_STANDARD=17']
 
 excluded_tests = {
     '': [
@@ -174,6 +170,13 @@ excluded_tests = {
 
 runtest = 'cd test && PYTHONUNBUFFERED=1 %(python)s run_test.py --continue-through-error  --verbose %(excluded_tests)s'
 
+# The readelf sanity check command can be taken out once the TestRPATH test from
+# https://github.com/pytorch/pytorch/pull/87593 is accepted, since it is then checked as part of the PyTorch test suite
+local_libcaffe2 = "$EBROOTPYTORCH/lib/python%%(pyshortver)s/site-packages/torch/lib/libcaffe2_nvrtc.%s" % SHLIB_EXT
+sanity_check_commands = [
+    "readelf -d %s | egrep 'RPATH|RUNPATH' | grep -v stubs" % local_libcaffe2,
+]
+
 # Especially test_quantization has a few corner cases that are triggered by the random input values,
 # those cannot be easily avoided, see https://github.com/pytorch/pytorch/issues/107030
 # So allow a low number of tests to fail as the tests "usually" succeed

@Flamefire Flamefire force-pushed the 20250221133605_new_pr_PyTorch1131 branch from 77e1827 to 75ccc7f Compare February 28, 2025 10:33
@github-actions github-actions Bot removed the update label Feb 28, 2025
@Flamefire
Copy link
Copy Markdown
Contributor Author

Test report by @Flamefire
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3633
FAILED
Build succeeded for 1 out of 2 (2 easyconfigs in total)
i8007 - Linux Rocky Linux 8.9 (Green Obsidian), x86_64, AMD EPYC 7352 24-Core Processor (zen2), 8 x NVIDIA NVIDIA A100-SXM4-40GB, 555.42.06, Python 3.8.17
See https://gist.github.com/Flamefire/eae14647c4b4afef5f6f00395d3ec706 for a full test report.

@Flamefire Flamefire force-pushed the 20250221133605_new_pr_PyTorch1131 branch from 8ca16b2 to 337a4d5 Compare April 1, 2025 08:07
@Flamefire
Copy link
Copy Markdown
Contributor Author

Test report by @Flamefire
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
i8012 - Linux Rocky Linux 8.9 (Green Obsidian), x86_64, AMD EPYC 7352 24-Core Processor (zen2), 8 x NVIDIA NVIDIA A100-SXM4-40GB, 555.42.06, Python 3.8.17
See https://gist.github.com/Flamefire/5b2b090a9e96a0faf4fce5528cd7abee for a full test report.

@Thyre Thyre added the 2022b label Aug 18, 2025
@boegel boegel added this to the 5.x milestone Apr 8, 2026
@boegel boegel changed the title Add unittest-xml-reporting build dependency to PyTorch 1.13 (foss 2022b) add patch to skip broken test_wrap_bad + add unittest-xml-reporting build dependency to PyTorch 1.13.1 Apr 8, 2026
@boegel
Copy link
Copy Markdown
Member

boegel commented Apr 8, 2026

@boegelbot please test @ jsc-zen3-a100
CORE_CNT=16

@boegelbot
Copy link
Copy Markdown
Collaborator

@boegel: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=22357 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_22357 --ntasks="16" --partition=jsczen3g --gres=gpu:1 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 10189

Test results coming soon (I hope)...

Details

- notification for comment with ID 4209062147 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
FAILED
Build succeeded for 4 out of 6 (total: 2 hours 57 mins 4 secs) (2 easyconfigs in total)
jsczen3g1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.7, x86_64, AMD EPYC-Milan Processor (zen3), 1 x NVIDIA NVIDIA A100 80GB PCIe, 590.48.01, Python 3.9.25
See https://gist.github.com/boegelbot/0eca9de0354ea448dcf1b5030488b268 for a full test report.

@Flamefire
Copy link
Copy Markdown
Contributor Author

Flamefire commented Apr 11, 2026

@boegel it is failing on this new check:

The following Python packages were likely specified with a wrong name because they are missing in the 'pip list' output:
pytorch (close matches in 'pip list' output: torch, pooch, pytoml (at easybuild/easybuild-easyblocks/easybuild/easyblocks/p/python.py:360 in run_pip_list)

Introduced in easybuilders/easybuild-easyblocks#4049 which needs to also consider modulename

The other failure is machine specific fixed by using the patch from #20176 which is already used in the non-CUDA version

@smoors
Copy link
Copy Markdown
Contributor

smoors commented Apr 11, 2026

@boegel it is failing on this new check:

The following Python packages were likely specified with a wrong name because they are missing in the 'pip list' output:
pytorch (close matches in 'pip list' output: torch, pooch, pytoml (at easybuild/easybuild-easyblocks/easybuild/easyblocks/p/python.py:360 in run_pip_list)

Introduced in easybuilders/easybuild-easyblocks#4049 which needs to also consider modulename

this is a perfect example why it's better to use PythonBundle over PythonPackage in general:

  • easyconfig name = PyTorch = official name
  • extension name = torch = name on PyPI
  • modulename = what is imported. it has nothing to do with the pip list check.

i understand if it's too much hassle to change to PythonBundle for PyTorch, that's why there's still the option to disable the check in the easyconfig:

sanity_check_pip_list = False

@Flamefire
Copy link
Copy Markdown
Contributor Author

i understand if it's too much hassle to change to PythonBundle for PyTorch, that's why there's still the option to disable the check in the easyconfig:

sanity_check_pip_list = False

Yes, we would need to change all PyTorch easyconfigs.
How much does this disable? E.g. we'd still want to check for 0.0 versions etc.
Maybe add sanity_check_pip_use_modulename which could be True or a string

@smoors
Copy link
Copy Markdown
Contributor

smoors commented Apr 13, 2026

only open PyTorch PRs need to be changed, but i see you just opened a lot of them recently, i'm sorry for that.. i can help you with that if you want?

sanity_check_pip_list = False does not disable any checks that existed before easybuilders/easybuild-easyblocks#4049

@Flamefire
Copy link
Copy Markdown
Contributor Author

Maybe that is the chance to port those to PythonBundle. But we definitely need some documentation somewhere that PythonBundle should be used when Software name and PYPI name are different and when to use PythonPackage.
I'd also put there that build-/test-only Python packages should go into separate easyconfigs, not exts_list.
Any idea where we can put that? I'd additionally put it into PythonBundle once we decided on the wording.

As for PyTorch PRs: We need to merge #25737 first, then I can start updating the PRs. I think I'll use that to try how well AI copes with that. ;-)

@Flamefire Flamefire force-pushed the 20250221133605_new_pr_PyTorch1131 branch from 2182e8d to 51a7ac3 Compare April 13, 2026 11:27
@Flamefire
Copy link
Copy Markdown
Contributor Author

Flamefire commented Apr 13, 2026

I spent some time and (together with CoPilot) created a script which automatically converts the PyTorch easyconfigs to PythonBundle. A wrapper will let it run over all my open PRs.
Example diff: https://github.com/Flamefire/easybuild-easyconfigs/pull/5/changes

Tricky part: tests and until easybuilders/easybuild-framework#5012 sanity_check_* options in extensions are ignored by EB.

Can you verify this example change please? Just want to make sure I didn't miss anything before doing the conversion for all PRs

This doesn't work because we don't allow multiple sources for extensions due to legacy reasons.
Hence reverted and disabling the sanity check

Comment thread easybuild/easyconfigs/p/PyTorch/PyTorch-1.13.1-foss-2022b-CUDA-11.7.0.eb Outdated
@github-actions github-actions Bot added the 2024a issues & PRs related to 2024a common toolchains label Apr 16, 2026
@Flamefire Flamefire force-pushed the 20250221133605_new_pr_PyTorch1131 branch from d73eb67 to b0e342b Compare April 16, 2026 07:28
@github-actions github-actions Bot removed the 2024a issues & PRs related to 2024a common toolchains label Apr 16, 2026
@Flamefire Flamefire force-pushed the 20250221133605_new_pr_PyTorch1131 branch 3 times, most recently from 312bb5e to 51a7ac3 Compare April 16, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants