diff --git a/cpuinfo-9321265af2078e98b91774a53bdccaea0f6665f8.zip b/cpuinfo-9321265af2078e98b91774a53bdccaea0f6665f8.zip new file mode 100644 index 0000000000000000000000000000000000000000..abbd45c4287b916753ef36770f001b7536eecd54 Binary files /dev/null and b/cpuinfo-9321265af2078e98b91774a53bdccaea0f6665f8.zip differ diff --git a/pytorch.spec b/pytorch.spec index 27eda9b5d1f9fa8d900221207eecbf16ceca7d24..4d9651b3ea981133b47ec7d0e5c36bddfe49c6cc 100644 --- a/pytorch.spec +++ b/pytorch.spec @@ -1,11 +1,13 @@ %global _empty_manifest_terminate_build 0 Name: pytorch Version: 2.1.2 -Release: 5 +Release: 6 Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration License: BSD-3-Clause URL: https://pytorch.org/ Source0: https://github.com/pytorch/pytorch/releases/download/v%{version}/pytorch-v%{version}.tar.gz +# Source from https://github.com/pytorch/cpuinfo/archive/9321265af2078e98b91774a53bdccaea0f6665f8.zip +Source1: cpuinfo-9321265af2078e98b91774a53bdccaea0f6665f8.zip Patch1: 0001-add-Wno-error-nonnull-for-test-cpp-api.patch Patch2: 0001-Fix-for-PyTorch-mobile-flatbuffer-loader-out-of-bounds-reads.patch @@ -61,6 +63,11 @@ You can reuse your favorite Python packages such as NumPy, SciPy and Cython to e %prep %autosetup -p1 -n %{name}-v%{version} +%ifarch riscv64 +rm -rf third_party/cpuinfo +unzip %{SOURCE1} -d third_party +mv third_party/cpuinfo-9321265af2078e98b91774a53bdccaea0f6665f8 third_party/cpuinfo +%endif %build export CFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -fPIC" @@ -94,6 +101,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Wed Jan 15 2025 Dingli Zhang - 2.1.2-6 +- Upgrade cpuinfo to support riscv64 + * Wed Jul 17 2024 Dingli Zhang - 2.1.2-5 - Fix build error for riscv64