From 4d6bb6e14ab10a171dd2b5d07f7511e607d0aa88 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sun, 31 Mar 2024 13:57:54 -0600 Subject: [PATCH 1/9] Provide pytorch as a convience Signed-off-by: Tom Rix --- python-torch.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-torch.spec b/python-torch.spec index 5f4e2e0..5cd6d3c 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -179,6 +179,9 @@ BuildRequires: google-benchmark-devel Provides: bundled(miniz) = 2.1.0 +# For convience +Provides: pytorch + %description PyTorch is a Python package that provides two high-level features: From f75a38ed41cfa465f486bf56ad53969aa221e432 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sun, 31 Mar 2024 19:55:46 -0600 Subject: [PATCH 2/9] Add a few missing files to install Signed-off-by: Tom Rix --- python-torch.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-torch.spec b/python-torch.spec index 5cd6d3c..ed7b039 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -443,10 +443,10 @@ sed -i -f br.sed devel.files %{python3_sitearch}/torch/utils/model_dump/{*.js,*.mjs,*.html} %{python3_sitearch}/torchgen/packaged/ATen/native/*.yaml %{python3_sitearch}/torchgen/packaged/autograd/{*.md,*.yaml} -%if %{with gitcommit} -%{python3_sitearch}/torch/_export/serde/schema.yaml %{python3_sitearch}/torch/distributed/pipeline/sync/_balance/py.typed %{python3_sitearch}/torch/distributed/pipeline/sync/py.typed +%if %{with gitcommit} +%{python3_sitearch}/torch/_export/serde/schema.yaml %endif # egg From 4f4ba3564bd04c7bf591d119a9ddfc46da8f5873 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Mon, 15 Apr 2024 13:35:06 -0600 Subject: [PATCH 3/9] Rebuild for libonnx Signed-off-by: Tom Rix --- python-torch.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-torch.spec b/python-torch.spec index ed7b039..540a467 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -845,6 +845,9 @@ sed -i -f br.sed devel.files # aten/src/ATen/native/cpu/avx_mathfun.h %changelog +* Mon Apr 15 2024 Tom Rix - 2.1.2-4 +- Rebuilt for libonnx + * Fri Jan 26 2024 Fedora Release Engineering - 2.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 11bcbe02b2110b1f197f5c05db4fa1c237d1b505 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Tue, 11 Jun 2024 05:21:07 -0600 Subject: [PATCH 4/9] Revert "Rebuild for libonnx" This reverts commit 4f4ba3564bd04c7bf591d119a9ddfc46da8f5873. --- python-torch.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-torch.spec b/python-torch.spec index 540a467..ed7b039 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -845,9 +845,6 @@ sed -i -f br.sed devel.files # aten/src/ATen/native/cpu/avx_mathfun.h %changelog -* Mon Apr 15 2024 Tom Rix - 2.1.2-4 -- Rebuilt for libonnx - * Fri Jan 26 2024 Fedora Release Engineering - 2.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 6f71567388e73c5e62eee8db4eab26de33359092 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Tue, 11 Jun 2024 05:21:43 -0600 Subject: [PATCH 5/9] Revert "Add a few missing files to install" This reverts commit f75a38ed41cfa465f486bf56ad53969aa221e432. --- python-torch.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-torch.spec b/python-torch.spec index ed7b039..5cd6d3c 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -443,10 +443,10 @@ sed -i -f br.sed devel.files %{python3_sitearch}/torch/utils/model_dump/{*.js,*.mjs,*.html} %{python3_sitearch}/torchgen/packaged/ATen/native/*.yaml %{python3_sitearch}/torchgen/packaged/autograd/{*.md,*.yaml} -%{python3_sitearch}/torch/distributed/pipeline/sync/_balance/py.typed -%{python3_sitearch}/torch/distributed/pipeline/sync/py.typed %if %{with gitcommit} %{python3_sitearch}/torch/_export/serde/schema.yaml +%{python3_sitearch}/torch/distributed/pipeline/sync/_balance/py.typed +%{python3_sitearch}/torch/distributed/pipeline/sync/py.typed %endif # egg From 7afc241f032444774c4313810c5f069b94cfec61 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Tue, 11 Jun 2024 05:22:14 -0600 Subject: [PATCH 6/9] Revert "Provide pytorch as a convience" This reverts commit 4d6bb6e14ab10a171dd2b5d07f7511e607d0aa88. --- python-torch.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-torch.spec b/python-torch.spec index 5cd6d3c..5f4e2e0 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -179,9 +179,6 @@ BuildRequires: google-benchmark-devel Provides: bundled(miniz) = 2.1.0 -# For convience -Provides: pytorch - %description PyTorch is a Python package that provides two high-level features: From 93593886f97b2ce3a13b7a777402918456d61160 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Tue, 11 Jun 2024 05:27:49 -0600 Subject: [PATCH 7/9] Reduce amd gpu list on F40 Signed-off-by: Tom Rix --- python-torch.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python-torch.spec b/python-torch.spec index 6f102ca..ea60d27 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -33,7 +33,12 @@ # hipblaslt is in development %bcond_with hipblaslt # Which families gpu build for +%if 0%{?fedora} > 40 %global rocm_gpu_list gfx8 gfx9 gfx10 gfx11 gfx90a gfx942 gfx1100 +%else +# F40 +%global rocm_gpu_list gfx8 gfx9 gfx10 gfx11 +%endif %global rocm_default_gpu default %bcond_without rocm_loop @@ -436,6 +441,7 @@ Summary: %{name} for ROCm gfx11 %description -n python3-%{pypi_name}-rocm-gfx11 %{summary} +%if 0%{?fedora} > 40 %package -n python3-%{pypi_name}-rocm-gfx90a Summary: %{name} for ROCm MI200 %description -n python3-%{pypi_name}-rocm-gfx90a @@ -450,6 +456,7 @@ Summary: %{name} for ROCm MI300 Summary: %{name} for W7900 %description -n python3-%{pypi_name}-rocm-gfx1100 %{summary} +%endif %endif @@ -985,6 +992,7 @@ done %{_libdir}/rocm/gfx11/bin/* %{_libdir}/rocm/gfx11/lib64/* +%if 0%{?fedora} > 40 %files -n python3-%{pypi_name}-rocm-gfx90a %{_libdir}/rocm/gfx90a/bin/* %{_libdir}/rocm/gfx90a/lib64/* @@ -996,6 +1004,7 @@ done %files -n python3-%{pypi_name}-rocm-gfx1100 %{_libdir}/rocm/gfx1100/bin/* %{_libdir}/rocm/gfx1100/lib64/* +%endif %endif From 0a219010a7d12407c004cbfdecdaadaadd164525 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Tue, 11 Jun 2024 12:05:23 -0600 Subject: [PATCH 8/9] Update sources Signed-off-by: Tom Rix --- .gitignore | 4 ++++ sources | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 315fe1c..621f21e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,7 @@ /pytorch-97ff6cf.tar.gz /pytorch-v2.3.0.tar.gz /pytorch-v2.3.1.tar.gz +/xnnpack-fcbf55a.tar.gz +/FXdiv-63058ef.tar.gz +/FP16-0a92994.tar.gz +/psimd-072586a.tar.gz diff --git a/sources b/sources index 60cce58..834f425 100644 --- a/sources +++ b/sources @@ -12,3 +12,7 @@ SHA512 (libnop-910b558.tar.gz) = 74c5324eaa1b6b2ac8dfef94c835b5c5b044625f8e5efe3 SHA512 (pytorch-97ff6cf.tar.gz) = 105ebcba298558fe833f90e7e40b003d35a74609e777f9dc4c47f5668c884f603455113ac0ff252a62b83c81137ae66ceb1a862d351203925dcfc3dcf9f73580 SHA512 (pytorch-v2.3.0.tar.gz) = 0c2ffc7bf2fd86070e9958c34eca1f03a0248a011ac6ffaeb69f65306ff856edd5359986f02af25888433187e6d7f29b60edded092e2ac30c8cec49023166eda SHA512 (pytorch-v2.3.1.tar.gz) = fe132251b2bae87b70ba3d95dc32f6a4545970d11893118b0ebe6ca129732e516ef4d6cc4f380b3db9bb2277d1db8ce78a401c40149bb1dfbab76eab9e3992c4 +SHA512 (xnnpack-fcbf55a.tar.gz) = 8063e27686f7b71cfba05b0c004c46db4506638689ffb112f013b3886de58653b60ca5487978c3f96275c17bb1136883ca4c93ddb2241a2c31925a950cb51759 +SHA512 (FXdiv-63058ef.tar.gz) = da33eab4d006645f383a1f24fc3e747db3aeb0613219297ec0ae69aa2617f07ba050ebd6a64a8cbde6d25481f176d0ec3b9753a95d1fbcead2136595f3e50e97 +SHA512 (FP16-0a92994.tar.gz) = 3f094f242425ea37de274eb8539dc5f8ab0c13fd5325d14180ef12e9c04e6002a110d086c4c667f7c8054af337deab096d59482eb95cc8a632c3c412b48e89d1 +SHA512 (psimd-072586a.tar.gz) = a18faea093423dd9fe19ece8b228e011dccce0a2a22222f777ea19b023a13173966d4a8aea01147e8fc58de5d39cffcedeb2221a1572ae52bd5aba1295f86a94 From a85b3ec7126cf9817346012f3dd79d1bd46ea2ba Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Tue, 11 Jun 2024 14:39:24 -0600 Subject: [PATCH 9/9] Fix broken cpuinfo for aarch64 Signed-off-by: Tom Rix --- .gitignore | 1 + python-torch.spec | 14 ++++++++++++-- sources | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 621f21e..72c29f9 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /FXdiv-63058ef.tar.gz /FP16-0a92994.tar.gz /psimd-072586a.tar.gz +/cpuinfo-d6860c4.tar.gz diff --git a/python-torch.spec b/python-torch.spec index ea60d27..29db936 100644 --- a/python-torch.spec +++ b/python-torch.spec @@ -172,6 +172,9 @@ Source32: https://github.com/Maratyszcza/FP16/archive/%{fp_commit}/FP16-%{ %global ps_commit 072586a71b55b7f8c584153d223e95687148a900 %global ps_scommit %(c=%{ps_commit}; echo ${c:0:7}) Source33: https://github.com/Maratyszcza/psimd/archive/%{ps_commit}/psimd-%{ps_scommit}.tar.gz +%global ci_commit d6860c477c99f1fce9e28eb206891af3c0e1a1d7 +%global ci_scommit %(c=%{ci_commit}; echo ${c:0:7}) +Source34: https://github.com/pytorch/cpuinfo/archive/%{ci_commit}/cpuinfo-%{ci_scommit}.tar.gz %endif %if %{without pthreadpool} @@ -245,7 +248,6 @@ ExclusiveArch: x86_64 aarch64 %global _lto_cflags %nil BuildRequires: cmake -BuildRequires: cpuinfo-devel BuildRequires: eigen3-devel BuildRequires: fmt-devel %if %{with caffe2} @@ -287,6 +289,7 @@ BuildRequires: pthreadpool-devel %endif %if %{with xnnpack} +BuildRequires: cpuinfo-devel BuildRequires: FP16-devel BuildRequires: fxdiv-devel BuildRequires: psimd-devel @@ -380,6 +383,8 @@ Provides: bundled(FP16) Provides: bundled(fxdiv) # MIT Provides: bundled(psimd) +# BSD-2-Clause +Provides: bundled(cpuinfo) %endif %if %{without pthreadpool} @@ -525,6 +530,9 @@ cp -r FP16-*/* third_party/FP16/ tar xf %{SOURCE33} rm -rf third_party/psimd/* cp -r psimd-*/* third_party/psimd/ +tar xf %{SOURCE34} +rm -rf third_party/cpuinfo/* +cp -r cpuinfo-*/* third_party/cpuinfo/ %endif %if %{without pthreadpool} @@ -630,6 +638,7 @@ mv third_party/XNNPACK . mv third_party/FXdiv . mv third_party/FP16 . mv third_party/psimd . +mv third_party/cpuinfo . %endif %if %{without pthreadpool} @@ -678,6 +687,7 @@ mv XNNPACK third_party mv FXdiv third_party mv FP16 third_party mv psimd third_party +mv cpuinfo third_party %endif %if %{without pthreadpool} @@ -814,7 +824,6 @@ export USE_PYTORCH_QNNPACK=OFF export USE_QNNPACK=OFF %endif export USE_ROCM=OFF -export USE_SYSTEM_CPUINFO=ON export USE_SYSTEM_SLEEF=ON export USE_SYSTEM_EIGEN_INSTALL=ON export USE_SYSTEM_ONNX=ON @@ -828,6 +837,7 @@ export USE_SYSTEM_PTHREADPOOL=ON %endif %if %{with xnnpack} +export USE_SYSTEM_CPUINFO=ON export USE_SYSTEM_FP16=ON export USE_SYSTEM_FXDIV=ON export USE_SYSTEM_PSIMD=ON diff --git a/sources b/sources index 834f425..444da8e 100644 --- a/sources +++ b/sources @@ -16,3 +16,4 @@ SHA512 (xnnpack-fcbf55a.tar.gz) = 8063e27686f7b71cfba05b0c004c46db4506638689ffb1 SHA512 (FXdiv-63058ef.tar.gz) = da33eab4d006645f383a1f24fc3e747db3aeb0613219297ec0ae69aa2617f07ba050ebd6a64a8cbde6d25481f176d0ec3b9753a95d1fbcead2136595f3e50e97 SHA512 (FP16-0a92994.tar.gz) = 3f094f242425ea37de274eb8539dc5f8ab0c13fd5325d14180ef12e9c04e6002a110d086c4c667f7c8054af337deab096d59482eb95cc8a632c3c412b48e89d1 SHA512 (psimd-072586a.tar.gz) = a18faea093423dd9fe19ece8b228e011dccce0a2a22222f777ea19b023a13173966d4a8aea01147e8fc58de5d39cffcedeb2221a1572ae52bd5aba1295f86a94 +SHA512 (cpuinfo-d6860c4.tar.gz) = 02dd70f0b95c2cb6d8af4e33072f63f5d72d2314796033ae68bb6b37cb7db18d43dd2cdfedafc896dec0614dbeec9ab507f765f3d958fbda8c0ab3e3a191a87c