diff --git a/pytorch.spec b/pytorch.spec index f1b247d298a05a7747d220eb231ab2012290da10..047d4bbfd37f02574e8b102335508e98862463db 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