diff --git a/pytorch.spec b/pytorch.spec index 27eda9b5d1f9fa8d900221207eecbf16ceca7d24..da0038c4ae4b3a135fd884264bf1003d179b34b1 100644 --- a/pytorch.spec +++ b/pytorch.spec @@ -1,7 +1,7 @@ %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/ @@ -9,12 +9,8 @@ Source0: https://github.com/pytorch/pytorch/releases/download/v%{version}/pytorc Patch1: 0001-add-Wno-error-nonnull-for-test-cpp-api.patch Patch2: 0001-Fix-for-PyTorch-mobile-flatbuffer-loader-out-of-bounds-reads.patch -%ifarch loongarch64 Patch3: 0003-Add-loongarch64-support-for-third_party.patch -%endif -%ifarch riscv64 Patch4: 0004-Fix-build-error-for-riscv64.patch -%endif BuildRequires: g++ Requires: python3-future @@ -60,7 +56,15 @@ PyTorch is a Python package that provides two high-level features: You can reuse your favorite Python packages such as NumPy, SciPy and Cython to extend PyTorch when needed. %prep -%autosetup -p1 -n %{name}-v%{version} +%setup -n %{name}-v%{version} +%patch -P 1 -p1 +%patch -P 2 -p1 +%ifarch loongarch64 +%patch -P 3 -p1 +%endif +%ifarch riscv64 +%patch -P 4 -p1 +%endif %build export CFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -fPIC" @@ -94,6 +98,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Tue Dec 17 2024 shenzhongwei - 2.1.2-6 +- include all patches in the source. + * Wed Jul 17 2024 Dingli Zhang - 2.1.2-5 - Fix build error for riscv64