From c210424fd7ef0396dc2af8124fbca19c5184db1d Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Tue, 17 Feb 2026 11:36:34 -0800 Subject: [PATCH] Update to 2.10 Signed-off-by: Tom Rix --- .gitignore | 1 + ...n-torch-check-if-tuning_cache-exists.patch | 40 +++++++++++++++++++ python-torch.spec | 8 +++- sources | 1 + 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 0001-python-torch-check-if-tuning_cache-exists.patch diff --git a/.gitignore b/.gitignore index 1ef9c4f..a0671f3 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /pytorch-v2.9.1.tar.gz /v3.19.6.tar.gz /v80.9.0.tar.gz +/pytorch-v2.10.0.tar.gz diff --git a/0001-python-torch-check-if-tuning_cache-exists.patch b/0001-python-torch-check-if-tuning_cache-exists.patch new file mode 100644 index 0000000..d314764 --- /dev/null +++ b/0001-python-torch-check-if-tuning_cache-exists.patch @@ -0,0 +1,40 @@ +From 4a58e5ebe5263d5dd5e5c44f28bce0ce256438f9 Mon Sep 17 00:00:00 2001 +From: Tom Rix +Date: Tue, 17 Feb 2026 08:11:25 -0800 +Subject: [PATCH] python-torch check if tuning_cache exists + +--- + tools/amd_build/build_amd.py | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/tools/amd_build/build_amd.py b/tools/amd_build/build_amd.py +index b2c2461a0888..2570730ce498 100755 +--- a/tools/amd_build/build_amd.py ++++ b/tools/amd_build/build_amd.py +@@ -225,9 +225,9 @@ fbgemm_dir = ( + / "third_party/fbgemm/fbgemm_gpu/experimental/gen_ai/src/quantize/common/include/fbgemm_gpu/quantize" + ) + +-if not buck_build: +- fbgemm_original = fbgemm_dir / "tuning_cache.cuh" ++fbgemm_original = fbgemm_dir / "tuning_cache.cuh" + ++if not buck_build and os.path.exists(fbgemm_original): + extra_files.append(fbgemm_original.as_posix()) + + hipify_python.hipify( +@@ -240,8 +240,9 @@ hipify_python.hipify( + hip_clang_launch=is_hip_clang(), + ) + +-if not buck_build: +- fbgemm_move_src = fbgemm_dir / "hip/tuning_cache.cuh" ++fbgemm_move_src = fbgemm_dir / "hip/tuning_cache.cuh" ++ ++if not buck_build and os.path.exists(fbgemm_move_src): + fbgemm_move_dst = fbgemm_dir / "tuning_cache_hip.cuh" + + # only update the file if it changes or doesn't exist +-- +2.52.0 + diff --git a/python-torch.spec b/python-torch.spec index 741f505..c1f4892 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -16,7 +16,7 @@ %global pybind11_version 2.13.6 %global rc_tag -rc9 %else -%global pypi_version 2.9.1 +%global pypi_version 2.10.0 %global flatbuffers_version 24.12.23 %global miniz_version 3.0.2 %global pybind11_version 2.13.6 @@ -129,6 +129,12 @@ Source100: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v% %global st_ver 80.9.0 Source110: https://github.com/pypa/setuptools/archive/refs/tags/v%{st_ver}.tar.gz +# FileNotFoundError: [Errno 2] No such file or directory: +# '.../third_party/fbgemm/fbgemm_gpu/experimental/gen_ai/src/quantize/common/ +# include/fbgemm_gpu/quantize/tuning_cache.cuh' +# https://github.com/pytorch/pytorch/issues/175160 +Patch: 0001-python-torch-check-if-tuning_cache-exists.patch + %global pt_arches x86_64 aarch64 ExclusiveArch: %pt_arches # Switch to clang temporarily on aarch64, GCC 16 + PyTorch 2.9.1 has problems diff --git a/sources b/sources index e184e73..868a803 100644 --- a/sources +++ b/sources @@ -19,3 +19,4 @@ SHA512 (pytorch-v2.9.0.tar.gz) = ae989e3a7fe30f9ea90944dc25e21ca92f2a94ee40d8de9 SHA512 (pytorch-v2.9.1.tar.gz) = 88de0289fa2760abd69bef505b5ae3b6d7ff176b415cbb31bbc89ce5476a3800b322a97c4490f270f8b89657aff931bf9a5516202b268e0bb8b1f63dbb87b34a SHA512 (v3.19.6.tar.gz) = 8f92242f2be8e1bbfba41341c87709ad91ad83b8b3e3df88bb430411541d3399295f49291fd52b50e3487b0fce33181cb4d175685fd25aac72adfaee26a612d4 SHA512 (v80.9.0.tar.gz) = e67c6c5e74691e65ecbf24fd19c1da545434ac1674f37c917f5ecc282a00bffc62d64164a885d19f177e99a3fa53db196e2be1cf0aa6811027e61d05119682da +SHA512 (pytorch-v2.10.0.tar.gz) = 64f5c62ac9ec7189ab27a787271e2d993d3230638b43792bbf6576e8ada840323d86ebfc4262d951266281623518cca5ba87f77ca61e165fef6a670fdf5b3c50