File python-torch.spec of Package python-torch-oldstable
#
# spec file for package python-torch
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python313 1
%define srcname pytorch
%define pname torch
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "standard"
%bcond_with cuda
%bcond_with rocm
%bcond_with gloo
%endif
%if "%{flavor}" == "rocm"
%bcond_without rocm
%global rocm_major 6
%global rocm_minor 2
%global rocm_release %{rocm_major}.%{rocm_minor}
%global pkg_suffix -rocm-%{rocm_major}-%{rocm_minor}
%endif
%if "%{flavor}" == "cuda-10-2"
%bcond_without cuda
%define cudaver 10-2
%bcond_with gloo
%endif
%bcond_with mpi
%if "%{flavor}" == "openmpi4"
%bcond_without mpi
%bcond_without openmpi4
%global mpi_flavor openmpi
%define mpi_ext 4
%endif
%if "%{flavor}" == "vulkan"
%bcond_without vulkan
%global pkg_suffix -vulkan
%bcond_with gloo
%endif
%if %{with mpi}
%global pkg_suffix %{?mpi_flavor:-%{mpi_flavor}%{?mpi_ext}}
%define pkg_prefix %{_libdir}/mpi/gcc/%{mpi_flavor}%{?mpi_ext}
%define pkg_bindir %{pkg_prefix}/bin/
%define pkg_libdir %{pkg_prefix}/%{_lib}/
%define pkg_incdir %{pkg_prefix}/include/
%define pkg_datadir %{pkg_prefix}/share/
%define pkg_sysconfdir %{pkg_prefix}/etc/
%define pkg_skeldir %{pkg_prefix}/etc/skel/
%define package_name %{pname}%{?pkg_suffix}
%endif
%define FP16_version 4dfe081
%define FXdiv_version b408327
%define QNNPACK_version 7d2a4e9
%define XNNPACK_version fcbf55a
%define cpuinfo_version d6860c4
%define flatbuffers 01834de
%define foxi_version c278588
%define fmt_version e69e5f9
%define gemmlowp_version 3fb5c
%define gloo_version 5354032
%define kineto 3f30237
%define libnop 910b558
%define onnx_version 990217f
%define pocketfft 9d3ab05
%define psimd_version 072586a
%define pthreadpool_version 4fe0e1e
%define pybind11_version 3e9dfa2
%define sleef_version e0a003e
%define tensorpipe 52791a2
%{?sle15_python_module_pythons}
Name: python-torch-oldstable%{?pkg_suffix}
Version: 2.3.1
Release: 0
Summary: Deep learning framework aka pytorch/Caffe2
License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Zlib AND BSL-1.0
Group: Development/Languages/Python
URL: https://pytorch.org
Source0: https://github.com/pytorch/pytorch/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
Source1: releases.html
# License10: BSD-3-Clause
Source10: https://github.com/facebookincubator/gloo/archive/%{gloo_version}.tar.gz#/gloo-%{gloo_version}.tar.gz
# License12: BSD-2-Clause
Source12: https://github.com/pytorch/cpuinfo/archive/%{cpuinfo_version}.tar.gz#/cpuinfo-%{cpuinfo_version}.tar.gz
# License13: BSL-1.0
Source13: https://github.com/zdevito/sleef/archive/%{sleef_version}.tar.gz#/sleef-%{sleef_version}.tar.gz
# License14: BSD-3-Clause
Source14: https://github.com/pybind/pybind11/archive/%{pybind11_version}.tar.gz#/pybind11-%{pybind11_version}.tar.gz
# License15: MIT
Source15: https://github.com/onnx/onnx/archive/%{onnx_version}.tar.gz#/onnx-%{onnx_version}.tar.gz
#License16: BSD-2-Clause
Source16: https://github.com/Maratyszcza/pthreadpool/archive/%{pthreadpool_version}.tar.gz#/pthreadpool-%{pthreadpool_version}.tar.gz
# License17: MIT
Source17: https://github.com/Maratyszcza/FXdiv/archive/%{FXdiv_version}.tar.gz#/FXdiv-%{FXdiv_version}.tar.gz
# License18: MIT
Source18: https://github.com/Maratyszcza/psimd/archive/%{psimd_version}.tar.gz#/psimd-%{psimd_version}.tar.gz
# License19: MIT
Source19: https://github.com/Maratyszcza/FP16/archive/%{FP16_version}.tar.gz#/FP16-%{FP16_version}.tar.gz
# License20: Apache-2.0
Source20: https://github.com/google/gemmlowp/archive/%{gemmlowp_version}.tar.gz#/gemmlowp-%{gemmlowp_version}.tar.gz
# License21: MIT
Source21: https://github.com/houseroad/foxi/archive/%{foxi_version}.tar.gz#/foxi-%{foxi_version}.tar.gz
# License22: MIT
Source22: https://github.com/pytorch/QNNPACK/archive/%{QNNPACK_version}.tar.gz#/QNNPACK-%{QNNPACK_version}.tar.gz
# License23: BSD-3-Clause
Source23: https://github.com/google/XNNPACK/archive/%{XNNPACK_version}.tar.gz#/XNNPACK-%{XNNPACK_version}.tar.gz
# License 25: MIT
Source25: https://github.com/fmtlib/fmt/archive/%{fmt_version}.tar.gz#/fmt-%{fmt_version}.tar.gz
# License 26: BSD-3-Clause
Source26: https://github.com/mreineck/pocketfft/archive/%{pocketfft}.tar.gz#/pocketfft-%{pocketfft}.tar.gz
# License 27: BSD-3-Clause
Source27: https://github.com/pytorch/kineto/archive/%{kineto}.tar.gz#/kineto-%{kineto}.tar.gz
# License 28: Apache-2.0
Source28: https://github.com/google/flatbuffers/archive/%{flatbuffers}.tar.gz#/flatbuffers-%{flatbuffers}.tar.gz
# License 29: BSD-3-Clause
Source29: https://github.com/pytorch/tensorpipe/archive/%{tensorpipe}.tar.gz#/tensorpipe-%{tensorpipe}.tar.gz
# License 30: Apache-2.0
Source30: https://github.com/google/libnop/archive/%{libnop}.tar.gz#/libnop-%{libnop}.tar.gz
Patch0: pytorch-fix-stdcxx14-error-__glibcxx_assert_fail.patch
Patch1: skip-third-party-check.patch
Patch2: fix-setup.patch
Patch3: pytorch-rocm-patch-buggy-find-magma.patch
Patch4: pytorch-rocm-do-not-use-aotriton-if-not-required.patch
Patch5: pytorch-rocm-aten-cmakefile.patch
Patch6: pytorch-rocm-c10_hip-cmakefile.patch
Patch7: pytorch-rocm-caffe2-cmakefile.patch
Patch8: pytorch-rocm-remove-caffe2-binaries.patch
Patch9: pytorch-optionally-use-hipblaslt-2-3-1.patch
Patch10: pytorch-use-any-hip.patch
Patch11: pytorch-rocm-fix-clang-build.patch
Patch12: pytorch-get-hip-compiler-env.patch
Patch13: pytorch-amd-build-check-clang.patch
Patch14: pytorch-cuda-hip-signatures.patch
Patch15: pytorch-hipify_python-copy-attrs.patch
Patch16: pytorch-hipify-rocm_version_h-path.patch
Patch17: pytorch-fix-build-gcc-15.patch
Patch20: pytorch-patch-onednn.patch
# A python call to cmake fails with a return code of 1 on this arch, disable it for now.
# and 32-bit arm is not supported
ExcludeArch: %ix86 %{arm}
%if %{with gloo}
BuildRequires: %{python_module Gloo}
%endif
%ifarch x86_64
BuildRequires: %{python_module PeachPy}
%endif
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module opcodes}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module protobuf}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module py-cpuinfo}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module typing_extensions}
BuildRequires: %{python_module typing}
BuildRequires: %{python_module dataclasses if %python-base < 3.7}
BuildRequires: cmake >= 3.5
BuildRequires: eigen3-devel
BuildRequires: fdupes
%if 0%{?suse_version} >= 1600
BuildRequires: gcc-c++
BuildRequires: protobuf-c
BuildRequires: protobuf-devel
%else
BuildRequires: gcc12-c++
BuildRequires: protobuf-c-devel-gcc12
BuildRequires: libstdc++6-devel-gcc12
BuildRequires: ocl-icd-devel
BuildRequires: protobuf-devel-gcc12
%endif
BuildRequires: glog-devel
BuildRequires: gtest
BuildRequires: leveldb-devel
BuildRequires: libnuma-devel
BuildRequires: libopenblas_pthreads-devel
BuildRequires: libuv-devel
BuildRequires: lmdb-devel
BuildRequires: ninja
%if %{without rocm}
%ifarch x86_64 aarch64 ppc64le
BuildRequires: onednn-devel
%endif
%endif
BuildRequires: openblas-devel
BuildRequires: opencv-devel
BuildRequires: openssl-devel
BuildRequires: python-rpm-macros
BuildRequires: snappy-devel
%if %{with cuda}
BuildRequires: cuda-compiler-%cudaver
BuildRequires: cuda-cudart-dev-%cudaver
BuildRequires: cuda-libraries-dev-%cudaver
BuildRequires: cuda-misc-headers-%cudaver
BuildRequires: cuda-nsight-%cudaver
BuildRequires: cuda-toolkit-%cudaver
BuildRequires: libcudnn7-devel
BuildRequires: libnccl-devel
Provides: %{python3_dist torch} = %version
%endif
%if %{with rocm}
BuildRequires: patchelf
BuildRequires: rocm-cmake
BuildRequires: rocm-rpm-macros
# this one pulls in the ROCm Clang package
BuildRequires: rocm-release(hip-devel) = %{rocm_release}
BuildRequires: cmake(COMgr-ROCm) = %{rocm_release}
BuildRequires: cmake(LLVM-ROCm) = %{rocm_release}
BuildRequires: cmake(rocm-runtime) = %{rocm_release}
BuildRequires: rocm-release(hipblas-devel) = %{rocm_release}
BuildRequires: rocm-release(hipblaslt-devel) = %{rocm_release}
BuildRequires: rocm-release(hipcub-headers) = %{rocm_release}
BuildRequires: rocm-release(hipfft-devel) = %{rocm_release}
BuildRequires: rocm-release(hiprand-devel) = %{rocm_release}
BuildRequires: rocm-release(hipsolver-devel) = %{rocm_release}
BuildRequires: rocm-release(hipsparse-devel) = %{rocm_release}
BuildRequires: rocm-release(rocblas-devel) = %{rocm_release}
BuildRequires: rocm-release(rocfft-devel) = %{rocm_release}
BuildRequires: rocm-release(rocm-core-devel) = %{rocm_release}
BuildRequires: rocm-release(rocprim-headers) = %{rocm_release}
BuildRequires: rocm-release(rocrand-devel) = %{rocm_release}
BuildRequires: rocm-release(miopen-devel) = %{rocm_release}
BuildRequires: rocm-release(rocthrust-headers) = %{rocm_release}
BuildRequires: rocm-release(roctracer-devel) = %{rocm_release}
Provides: rocm-release(python-torch) = %{rocm_release}
%endif
%if %{with openmpi4}
BuildRequires: openmpi4-devel
%endif
%if %{with vulkan}
BuildRequires: VulkanMemoryAllocator-devel
BuildRequires: shaderc
BuildRequires: vulkan-devel
%endif
Requires: python-numpy
Requires: python-protobuf
Requires: python-six
Requires: python-typing_extensions
Provides: python-caffe2%{?pkg_suffix} = %version
Conflicts: python-caffe2%{?pkg_suffix} < %version
Provides: python-pytorch%{?pkg_suffix} = %version
Conflicts: python-pytorch%{?pkg_suffix} < %version
%if %{with rocm} || %{with openmpi4} || %{with vulkan}
Provides: python-caffe2 = %version
Conflicts: python-caffe2 < %version
Provides: python-pytorch = %version
Conflicts: python-pytorch < %version
%endif
%if "%flavor" == ""
ExclusiveArch: do_not_build
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
PyTorch enables fast, flexible experimentation and efficient production through
a hybrid front-end, distributed training, and ecosystem of tools and libraries.
The library is developed by Facebook and other groups.
PyTorch provides two high-level features:
* Tensor computing (like NumPy) with strong acceleration via graphics
* processing units (GPU) Deep neural networks built on a tape-based autodiff
system
%package devel
Summary: Headers for C/C++, cmake build description and libraries needed for development
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
%if %{with rocm}
Provides: python-torch-devel = %version
Provides: rocm-release(python-torch-devel) = %{rocm_release}
%endif
%if %{with openmpi4}
Provides: python-torch-devel = %version
%endif
%if %{with vulkan}
Provides: python-torch-devel = %version
%endif
%description devel
Although the Python interface is more polished and the primary focus of
development, PyTorch also has a C++ frontend. This package contains the header
to access the C/C++ interface.
%package converters
Summary: Converters for onnx and caffe2
Group: Development/Languages/Python
BuildArch: noarch
Requires: python-click
Requires: python-onnx
Requires: python-pip
Requires: python-pname
%if %{with rocm}
Provides: python-torch-converters = %version
Provides: rocm-release(python-torch-converters) = %{rocm_release}
%endif
%if %{with openmpi4}
Provides: python-torch-converters = %version
%endif
%if %{with vulkan}
Provides: python-torch-converters = %version
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
%description converters
Converter from caffe2 to onnx and from caffe2 to onnx formated files.
%prep
%define make_depend_src() test -e $(basename %1| sed 's/-.*//') && rmdir %{?2}%{!?2:$(basename %1| sed 's/-.*//')}; tar xzf %1; mv $(basename %{1} | sed 's/\.tar\.gz//' )* %{?2}%{!?2:$(basename %1| sed 's/-.*//')}
%define make_depend_src_uppercase() rmdir -p $(basename %1| sed 's/-.*//'| tr '[:upper:]' '[:lower:]'); tar xzf %1; mv $(basename %1 | cut -f 1 -d '.' ) $(basename %1| sed 's/-.*//'| tr '[:upper:]' '[:lower:]')
%autosetup -p1 -n %{srcname}-%{version}
cp %{S:1} releases.html
%if %{with vulkan}
sed -i '/-Werror=return-type/d' CMakeLists.txt
%endif
cd third_party
rmdir python-peachpy/
rmdir eigen/
%make_depend_src %{SOURCE10}
%make_depend_src %{SOURCE12}
%make_depend_src %{SOURCE13}
%make_depend_src %{SOURCE14}
%make_depend_src %{SOURCE15}
%make_depend_src %{SOURCE16}
%make_depend_src %{SOURCE17}
%make_depend_src %{SOURCE18}
%make_depend_src %{SOURCE19}
%make_depend_src %{SOURCE20} gemmlowp/gemmlowp
%make_depend_src %{SOURCE21}
%make_depend_src %{SOURCE22}
%make_depend_src %{SOURCE23}
%make_depend_src %{SOURCE25}
%make_depend_src %{SOURCE26}
%make_depend_src %{SOURCE27}
%make_depend_src %{SOURCE28}
%make_depend_src %{SOURCE29}
# getting the vendoring of the vendored source working, this is
# insanity at the next level. My onlu exuse is that libnop is header only
rmdir tensorpipe/third_party/libnop
%make_depend_src %{SOURCE30} tensorpipe/third_party/libnop
cd -
find -name CMakeLists.txt | xargs sed -e 's|CXX_STANDARD 14|CXX_STANDARD 17|' -e 's|CXX_STANDARD 11|CXX_STANDARD 17|' -i
%if %{with rocm}
python3.11 ./tools/amd_build/build_amd.py
%endif
%build
# enable sccache during build if available
if command -v ccache > /dev/null; then
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export CMAKE_C_COMPILER_LAUNCHER=ccache
%if %{with rocm}
export HIP_CLANG_LAUNCHER=ccache
%endif
fi
%define buildvars \
export CMAKE_POLICY_VERSION_MINIMUM=3.5 \
export CMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF \
export PYTORCH_BUILD_VERSION="%{version}" \
export PYTORCH_BUILD_NUMBER="%(echo "%{release}" | tr -cd '[:digit:]')" \
export MAX_JOBS=%{?jobs} \
export BUILD_CUSTOM_PROTOBUF=OFF \
export BUILD_NVFUSER=OFF \
export BUILD_SHARED_LIBS=ON \
export BUILD_TEST=OFF \
export INTERN_BUILD_MOBILE=OFF \
export USE_DISTRIBUTED=OFF \
export USE_FAKELOWP=OFF \
export USE_XPU=OFF \
export USE_SYSTEM_LIBS=OFF \
export USE_FLASH_ATTENTION=OFF \
export USE_NNPACK=OFF \
export LC_ALL="C.UTF-8" \
# Caffe2 support was removed from pytorch with version 2.2.0 \
export BUILD_CAFFE2=OFF \
export BUILD_CAFFE2_OPS=OFF \
%if 0%{?suse_version} > 1500 \
export CC=gcc-%gcc_version \
export CXX=g++-%gcc_version \
%else \
export CC=gcc-12 \
export CXX=g++-12 \
%endif \
%if %{with cuda} \
export USE_CUDA=ON \
export USE_CUDNN=ON \
export USE_SYSTEM_NCCL=ON \
export PATH="/usr/local/cuda-10.1/bin:$PATH" \
export CPLUS_INCLUDE_PATH="/usr/local/cuda-10.1/include" \
export C_INCLUDE_PATH="/usr/local/cuda-10.1/include" \
export LD_LIBRARY_PATH="/usr/local/cuda-10.1/lib" \
export NCCL_INCLUDE_DIR="/usr/include/" \
%else \
export USE_CUDA=OFF \
export USE_CUDNN=OFF \
export USE_NCCL=OFF \
%endif \
export USE_KINETO=OFF \
export USE_LEVELDB=ON \
export USE_LMDB=ON \
export USE_FBGEMM=OFF \
export USE_MKLDNN=ON \
export USE_SYSTEM_PSIMD=OFF \
export USE_SYSTEM_FXDIV=OFF \
export USE_SYSTEM_BENCHMARK=ON \
export USE_SYSTEM_EIGEN_INSTALL=ON \
export USE_SYSTEM_PYBIND11=OFF \
export USE_OPENCV=ON \
export USE_OPENMP=OFF \
export USE_TBB=OFF \
export USE_KINETO=OFF \
export TP_BUILD_LIBUV=OFF \
export BLAS=OpenBLAS \
export USE_DISTRIBUTED=OFF \
%if %{with rocm} \
export PYTORCH_ROCM_ARCH="%{list_sep rocm_gpu_list ;}" \
export USE_ROCM=ON \
export USE_MKL=OFF \
export USE_MKLDNN=OFF \
export USE_MAGMA=OFF \
export USE_FLASH_ATTENTION=OFF \
export USE_MEM_EFF_ATTENTION=OFF \
export USE_GOLD_LINKER=OFF \
export MAX_JOBS=$(nproc --ignore=1) \
export CC=clang-rocm \
export CXX=clang++-rocm \
export CFLAGS="-Wno-unknown-warning-option -Wno-unused-result -Wno-sign-compare -Wno-deprecated-declarations" \
export CXXFLAGS="$CFLAGS" \
export HIPCXX=hipcc \
export HIPCXXFLAGS="$CFLAGS -Wno-pass-failed" \
export HIP_PATH=`hipconfig -p` \
export ROCM_PATH=`hipconfig -R` \
export ROCM_INCLUDE_DIRS=${HIP_PATH}/include \
export HIP_CLANG_PATH=`hipconfig -l` \
export USE_LLVM=${ROCM_PATH}/ \
export LLVM_DIR=${ROCM_PATH}/%{_lib}/cmake/llvm \
export DEVICE_LIB_PATH="`${HIP_CLANG_PATH}/${CXX} -print-resource-dir`/amdgcn/bitcode" \
%else \
export USE_ROCM=OFF \
%endif \
%if %{with mpi} \
export USE_DISTRIBUTED=ON \
export USE_MPI=ON \
export MPIEXEC_EXECUTABLE="%{pkg_bindir}/mpiexec" \
%else \
%if %{with gloo} \
export USE_DISTRIBUTED=ON \
export USE_GLOO=ON \
export USE_SYSTEM_GLOO=ON \
%endif \
%endif \
%if %{with vulkan} \
export USE_VULKAN=ON \
export CXXFLAGS="-I /usr/ -Wno-error=return-type" \
%endif \
%{nil}
%buildvars
%python_build
%install
%buildvars
%python_install -q
%{python_expand # \
for file in $(find %{buildroot}%{$python_sitearch} -type f -name '*.py' -perm 644 -size +1b); do \
sed -n -E '1 {/\/usr\/bin\/.*python.*/!{Q1}}' "$file" \
&& sed -i -E "1s|/usr/bin/.*python.*|$(realpath /usr/bin/python%{$python_bin_suffix})|" "$file" \
&& chmod 755 "$file"; \
done
}
%python_compileall
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%if %{with rocm}
%{python_expand find %{buildroot}%{$python_sitearch} -wholename '*/bin/*' -o -name '*.so' | xargs -n 1 patchelf --debug --shrink-rpath --allowed-rpath-prefixes '$ORIGIN'}
%endif
%python_clone -a %{buildroot}%{_bindir}/torchrun
%python_clone -a %{buildroot}%{_bindir}/convert-caffe2-to-onnx
%python_clone -a %{buildroot}%{_bindir}/convert-onnx-to-caffe2
%post
%python_install_alternative torchrun
%end
%postun
%python_uninstall_alternative torchrun
%end
%post converters
%{python_install_alternative convert-caffe2-to-onnx convert-onnx-to-caffe2}
%end
%postun converters
%python_uninstall_alternative convert-caffe2-to-onnx
%end
%files %{python_files}
%defattr(-,root,root)
%doc README.md releases.html
%license LICENSE NOTICE
%{python_sitearch}/torch*
%{python_sitearch}/torchgen/
%{python_sitearch}/functorch/
%exclude %{python_sitearch}/torch/share
%exclude %{python_sitearch}/torch/include
%exclude %{python_sitearch}/torch/_inductor/codegen
%exclude %{python_sitearch}/torch/utils/benchmark/utils/
%exclude %{python_sitearch}/torchgen/packaged/ATen/templates
%exclude %{python_sitearch}/torchgen/packaged/autograd/templates
%python_alternative %{_bindir}/torchrun
%files %{python_files devel}
%{python_sitearch}/torch/share
%{python_sitearch}/torch/include
%{python_sitearch}/torch/_inductor/codegen
%{python_sitearch}/torch/utils/benchmark/utils/
%{python_sitearch}/torchgen/packaged/ATen/templates
%{python_sitearch}/torchgen/packaged/autograd/templates
%files %{python_files converters}
%python_alternative %{_bindir}/convert-caffe2-to-onnx
%python_alternative %{_bindir}/convert-onnx-to-caffe2
%changelog
* Thu Jul 11 2024 Christian Goll <cgoll@suse.com>
- update to 2.3.1 with following summarized highlights:
* from 2.0.x:
- torch.compile is the main API for PyTorch 2.0, which wraps your model and
returns a compiled model. It is a fully additive (and optional) feature
and hence 2.0 is 100%% backward compatible by definition
- Accelerated Transformers introduce high-performance support for training
and inference using a custom kernel architecture for scaled dot product
attention (SPDA). The API is integrated with torch.compile() and model
developers may also use the scaled dot product attention kernels directly
by calling the new scaled_dot_product_attention() operato
* from 2.1.x:
- automatic dynamic shape support in torch.compile,
torch.distributed.checkpoint for saving/loading distributed training jobs
on multiple ranks in parallel, and torch.compile support for the NumPy
API.
- In addition, this release offers numerous performance improvements (e.g.
CPU inductor improvements, AVX512 support, scaled-dot-product-attention
support) as well as a prototype release of torch.export, a sound
full-graph capture mechanism, and torch.export-based quantization.
* from 2.2.x:
- 2x performance improvements to scaled_dot_product_attention via
FlashAttention-v2 integration, as well as AOTInductor, a new
ahead-of-time compilation and deployment tool built for non-python
server-side deployments.
* from 2.3.x:
- support for user-defined Triton kernels in torch.compile, allowing for
users to migrate their own Triton kernels from eager without
experiencing performance complications or graph breaks. As well, Tensor
Parallelism improves the experience for training Large Language Models
using native PyTorch functions, which has been validated on training
runs for 100B parameter models.
- added seperate openmpi4 build
- added sepetate vulcan build, although this functions isn't exposed to python
abi
- For the obs build all the vendored sources follow the pattern
NAME-7digitcommit.tar.gz and not the NAME-COMMIT.tar.gz
- added following patches:
* skip-third-party-check.patch
* fix-setup.patch
- removed patches:
* pytorch-rm-some-gitmodules.patch
* fix-call-of-onnxInitGraph.patch
* Thu Jul 22 2021 Guillaume GARDET <guillaume.gardet@opensuse.org>
- Fix build on x86_64 by using GCC10 instead of GCC11
https://github.com/google/XNNPACK/issues/1550
* Thu Jul 22 2021 Guillaume GARDET <guillaume.gardet@opensuse.org>
- Update to 1.9.0
- Release notes: https://github.com/pytorch/pytorch/releases/tag/v1.9.0
- Drop upstreamed patch:
* fix-mov-operand-for-gcc.patch
- Drop unneeded patches:
* removed-peachpy-depedency.patch
- Refresh patches:
* skip-third-party-check.patch
* fix-call-of-onnxInitGraph.patch
- Add new patch:
* pytorch-rm-some-gitmodules.patch
* Thu Jul 22 2021 Guillaume GARDET <guillaume.gardet@opensuse.org>
- Add _service file to ease future update of deps
* Thu Jul 22 2021 Guillaume GARDET <guillaume.gardet@opensuse.org>
- Update sleef to fix build on aarch64
* Fri Apr 23 2021 Matej Cepl <mcepl@suse.com>
- Don't build python36-* package (missing pandas)
* Thu Jan 21 2021 Benjamin Greiner <code@bnavigator.de>
- Fix python-rpm-macros usage
* Wed Oct 7 2020 Guillaume GARDET <guillaume.gardet@opensuse.org>
- Use GCC9 to build on aarch64 Tumbleweed to workaround SVE
problem with GCC10 with sleef, see:
https://github.com/pytorch/pytorch/issues/45971
* Thu Aug 20 2020 Martin Liška <mliska@suse.cz>
- Use memoryperjob constraint instead of %%limit_build macro.
* Tue Jun 23 2020 Christian Goll <cgoll@suse.com>
- updated to new stable release 1.5.1 which has following changes:
This release includes several major new API additions and improvements. These
include new APIs for autograd allowing for easy computation of hessians and
jacobians, a significant update to the C++ frontend, ‘channels last’ memory
format for more performant computer vision models, a stable release of the
distributed RPC framework used for model parallel training, and a new API
that allows for the creation of Custom C++ Classes that was inspired by
PyBind. Additionally torch_xla 1.5 is now available and tested with the
PyTorch 1.5 release providing a mature Cloud TPU experience.
* see release.html for detailed information
- added patches:
* fix-call-of-onnxInitGraph.patch for API mismatch in onnx
* fix-mov-operand-for-gcc.patch for aarch64 operands
- removed sources:
* cpuinfo-89fe1695edf9ee14c22f815f24bac45577a4f135.tar.gz
* gloo-7c541247a6fa49e5938e304ab93b6da661823d0f.tar.gz
* onnx-fea8568cac61a482ed208748fdc0e1a8e47f62f5.tar.gz
* psimd-90a938f30ba414ada2f4b00674ee9631d7d85e19.tar.gz
* pthreadpool-13da0b4c21d17f94150713366420baaf1b5a46f4.tar.gz
- added sources:
* cpuinfo-0e6bde92b343c5fbcfe34ecd41abf9515d54b4a7.tar.gz
* gloo-113bde13035594cafdca247be953610b53026553.tar.gz
* onnx-9fdae4c68960a2d44cd1cc871c74a6a9d469fa1f.tar.gz
* psimd-10b4ffc6ea9e2e11668f86969586f88bc82aaefa.tar.gz
* pthreadpool-d465747660ecf9ebbaddf8c3db37e4a13d0c9103.tar.gz
* Tue Jun 23 2020 Christian Goll <cgoll@suse.com>
- updated to bugfix release 1.4.1 and added _multibuild file so
that cuda versions can be build on commandline
* Thu Apr 23 2020 Tomáš Chvátal <tchvatal@suse.com>
- Make sure to pull py2/py3 package from the devel pkg
* Thu Apr 23 2020 Tomáš Chvátal <tchvatal@suse.com>
- Do not pull in python2 only dependencies
* Wed Feb 26 2020 Simon Lees <sflees@suse.de>
- Exclude i586 builds for now, they fail with a cryptic return
code of 1 from cmake from python.
* Fri Feb 21 2020 Christian Goll <cgoll@suse.com>
- updated to stable release 1.4.0, which has as Highlights:
* Distributed Model Parallel Training
* Pruning functionalities have been added to PyTorch
- New Features:
* torch.optim.lr_scheduler now support “chaining.”
* torch.distributed.rpc is a newly introduced package
- full Changelog listed in relases file or under
https://github.com/pytorch/pytorch/releases
and in the releases.hml file
- added files:
* skip-third-party-check.patch which is a patch to skip
the check of disabled dependencies
* QNNPACK-7d2a4e9931a82adc3814275b6219a03e24e36b4c.tar.gz
which is part of pytorch but developed in different repo
* releases.html which is the downloaded releases file
- removed patch files:
* fix-build-options.patch
* honor-PSIMD-env.patch
* removed-some-tests.patch
* Tue Jan 14 2020 Guillaume GARDET <guillaume.gardet@opensuse.org>
- Requires python-PeachPy on x86_64 only, as it is optional
and available on x86_64 only
* Wed Jan 8 2020 Christian Goll <cgoll@suse.com>
- updated the requirement for examples and converters
* Wed Jun 12 2019 Christian Goll <cgoll@suse.com>
- Updated to stable version 1.1.0, which needed also updates of
following dependend sources:
* onnx-1.4.1.tar.gz ->
onnx-22662bfd4dcc6baebf29e3b823a051676f991001.tar.gz
- Removed following sources:
* FBGEMM-f65f0ebe54f0512d8f42ee10025b596e3f42e0b8.tar.gz
- Added following sources:
* foxi-8f74bc4df3a4cfc69b1a3eadf62aa29d9961c72d.tar.gz
- Changed patch
* fix-build-options.patch to work with new buid system and
exclude FBGEMM
- Added patch:
* honor-PSIMD-env.patch, which makes depend sources of pytorch
to use the source of psimd
* Tue Mar 26 2019 Christian Goll <cgoll@suse.com>
- Inital commit of pytorch/caffe2 which is an opensource
machineleraning platform. This is the stable release 1.0.1
including like other tools a lot of third party sources,
which could not be used from the base system due to messy
build system. Additional sources are
* gloo, a communitcation library for GPUs as
gloo-670b4d4aa46886cc66874e2a4dc846f5cfc2a285.tar.gz
* fbgemm, a low precission, high peformance matrix lib
FBGEMM-f65f0ebe54f0512d8f42ee10025b596e3f42e0b8.tar.gz
* cpuinfo, a cross platform cpu information tool
cpuinfo-89fe1695edf9ee14c22f815f24bac45577a4f135.tar.gz
* sleef, a function for elementary functions
sleef-191f655caa25526ae226cf88dd2529265176014a.tar.gz
* pytbind11, which exposes C/C++ headers to pythob, but
the source code of this library is deeply integrated into
pytorch, so we need
pybind11-25abf7efba0b2990f5a6dfb0a31bc65c0f2f4d17.tar.gz
* onnx, which is an format for exchaning neural networks as
onnx-1.4.1.tar.gz
* pthreadpool, a pthread based thread tool implementation, which
can be used when omp is not available
pthreadpool-13da0b4c21d17f94150713366420baaf1b5a46f4.tar.gz
* FXdiv, a Header-only library for division via fixed-point
multiplication by inverse, which has no stable API atm, so
FXdiv-b742d1143724d646cd0f914646f1240eacf5bd73.tar.gz
* psimd, portable 128-bit SIMD intrinsics
psimd-90a938f30ba414ada2f4b00674ee9631d7d85e19.tar.gz
* fp16, a numeric conversion library
FP16-febbb1c163726b5db24bed55cc9dc42529068997.tar.gz
* gemmlowp, self-contained low-precision GEMM library as
gemmlowp-8416bab644641a5c0a81ecf91a5cda804af0aee1.tar.gz
* fix-build-options.patch, which points pytorch to system libs
* removed-peachpy-depedency.patch, which forces to use system
peachpy