From 076917d3b8ff1b0ffab895dbb56abbca7bca1f97 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:11:45 +0800 Subject: [PATCH] include all patches in the source. --- pytorch.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pytorch.spec b/pytorch.spec index f1b247d..047d4bb 100644 --- a/pytorch.spec +++ b/pytorch.spec @@ -1,16 +1,14 @@ %global _empty_manifest_terminate_build 0 Name: pytorch Version: 2.1.2 -Release: 3 +Release: 4 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 Patch1: 0001-add-Wno-error-nonnull-for-test-cpp-api.patch -%ifarch riscv64 Patch2: 0002-Fix-build-error-for-riscv64.patch -%endif BuildRequires: g++ Requires: python3-future Requires: python3-numpy @@ -55,7 +53,12 @@ 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 + +%ifarch riscv64 +%patch -P 2 -p1 +%endif %build export CFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -fPIC" @@ -89,6 +92,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Tue Dec 17 2024 shenzhongwei - 2.1.2-4 +- include all patches in the source. + * Wed Jul 17 2024 Dingli Zhang - 2.1.2-3 - Fix build error for riscv64 -- Gitee