From 177eb804c8058e574d3f4650ca7417252507de71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E4=BB=B2=E4=BC=9F?= Date: Tue, 17 Dec 2024 16:17:56 +0800 Subject: [PATCH] include all patches in the source. --- pytorch.spec | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pytorch.spec b/pytorch.spec index 27eda9b..da0038c 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 -- Gitee