diff --git a/download b/download index e3eba1a46c5c06065ca0599e473534772d561e47..31f15d97febc5047c21bcf3436ae4ea0b8413df2 100644 --- a/download +++ b/download @@ -1 +1 @@ -6186b06618415e1c4a2c9f057893c4f0 pytorch-v2.0.1.tar.gz +4d7c2453709f9b6c6279812b5d42060c pytorch-v2.2.0.tar.gz diff --git a/pytorch.spec b/pytorch.spec index c04ea59aa98c919ed22e036fcf9f6e5e159d6002..7cc003d25e7a74f2d3427ef8c6ce6bebbda00cd8 100644 --- a/pytorch.spec +++ b/pytorch.spec @@ -1,4 +1,4 @@ -%define anolis_release 4 +%define anolis_release 1 %global vcu_maj 12 %global vcu_min 1 @@ -10,7 +10,7 @@ %undefine _missing_build_ids_terminate_build Name: pytorch -Version: 2.0.1 +Version: 2.2.0 Release: %{anolis_release}%{dist} Summary: PyTorch Neural Network Package License: BSD @@ -22,36 +22,11 @@ Patch0: 0001-Workaround-NVCC-parse-failure-in-cast_op.patch BuildRequires: python3-devel cmake gcc-c++ BuildRequires: python3-typing-extensions python3-pyyaml python3-setuptools BuildRequires: python3-six python3-numpy - -BuildRequires: cuda-nvcc-%{vcu_maj}-%{vcu_min} -BuildRequires: cuda-nvtx-%{vcu_maj}-%{vcu_min} -BuildRequires: cuda-cupti-%{vcu_maj}-%{vcu_min} -BuildRequires: cuda-cudart-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: cuda-nvml-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: cuda-nvrtc-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: cuda-driver-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: cuda-profiler-api-%{vcu_maj}-%{vcu_min} -BuildRequires: libcublas-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: libcufft-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: libcurand-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: libcusparse-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: libcusolver-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: libnvjitlink-devel-%{vcu_maj}-%{vcu_min} -BuildRequires: libnccl-devel -BuildRequires: libcudnn-devel -BuildRequires: magma-devel numactl-devel +BuildRequires: python3-astunparse +BuildRequires: python3-requests +BuildRequires: python3-wheel BuildRequires: chrpath -Requires: cuda-cudart-%{vcu_maj}-%{vcu_min} -Requires: cuda-nvrtc-%{vcu_maj}-%{vcu_min} -Requires: cuda-nvtx-%{vcu_maj}-%{vcu_min} -Requires: libcublas-%{vcu_maj}-%{vcu_min} -Requires: libcufft-%{vcu_maj}-%{vcu_min} -Requires: libcurand-%{vcu_maj}-%{vcu_min} -Requires: libcusparse-%{vcu_maj}-%{vcu_min} -Requires: libcusolver-%{vcu_maj}-%{vcu_min} -Requires: libnvjitlink-%{vcu_maj}-%{vcu_min} - Provides: pytorch-python3 = %{version}-%{release} Obsoletes: pytorch-python3 < %{version}-%{release} @@ -67,29 +42,16 @@ Requires: %{name} = %{version}-%{release} This package contains development files for pythorch. %prep -%setup -q -n %{name}-v%{version} -%patch0 -p1 +%autosetup -n %{name}-v%{version} -p1 %build -export BUILD_TEST=False -export PYTORCH_BUILD_VERSION=%{version} -export PYTORCH_BUILD_NUMBER=1 -export CUDAARCHS="all" -export CMAKE_CUDA_COMPILER=/usr/local/cuda-%{vcu_maj}.%{vcu_min}/bin/nvcc -export TORCH_CUDA_ARCH_LIST="6.0;6.1;7.0;7.5;8.0;8.6" export CFLAGS="${CFLAGS} -Wno-maybe-uninitialized -Wno-uninitialized -Wno-free-nonheap-object -Wno-restrict" export CXXFLAGS=$CFLAGS python3 setup.py build %install -export BUILD_TEST=False -export PYTORCH_BUILD_VERSION=%{version} -export PYTORCH_BUILD_NUMBER=1 -export CUDAARCHS="all" -export CMAKE_CUDA_COMPILER=/usr/local/cuda-%{vcu_maj}.%{vcu_min}/bin/nvcc -export TORCH_CUDA_ARCH_LIST="6.0;6.1;7.0;7.5;8.0;8.6" export CFLAGS="${CFLAGS} -Wno-maybe-uninitialized -Wno-uninitialized -Wno-free-nonheap-object -Wno-restrict" export CXXFLAGS=$CFLAGS @@ -98,7 +60,6 @@ python3 setup.py install --prefix %{buildroot}/usr chrpath -d %{buildroot}/%{python3_sitearch}/torch/lib/* chrpath -d %{buildroot}/%{python3_sitearch}/torch/bin/* -chrpath -d %{buildroot}/%{python3_sitearch}/nvfuser/*.so chrpath -d %{buildroot}/%{python3_sitearch}/functorch/*.so mkdir -p %{buildroot}/etc/ld.so.conf.d @@ -107,14 +68,14 @@ echo "%{python3_sitearch}/torch/lib" > %{buildroot}/etc/ld.so.conf.d/torch.conf %ldconfig_scriptlets %pretrans -p -path = "/usr/lib64/python3.10/site-packages/torch/lib" +path = "/usr/lib64/python3.11/site-packages/torch/lib" st = posix.stat(path) if st and st.type == "link" then os.remove(path) end %pretrans devel -p -path = "/usr/lib64/python3.10/site-packages/torch/include" +path = "/usr/lib64/python3.11/site-packages/torch/include" st = posix.stat(path) if st and st.type == "link" then os.remove(path) @@ -136,6 +97,9 @@ end %{python3_sitearch}/torch/share %changelog +* Mon Aug 04 2025 wenxin - 2.2.0-1 +- update to 2.2.0 to fix CVE-2024-31583, CVE-2024-31580, CVE-2024-31584 + * Thu Nov 2 2023 Zhongling He - 2.0.1-4 - fix NVCC parse failure in cast_op