[arch-commits] Commit in python-pytorch/repos/community-x86_64 (13 files)

Sven-Hendrik Haase svenstaro at gemini.archlinux.org
Sat Jul 2 18:37:19 UTC 2022


    Date: Saturday, July 2, 2022 @ 18:37:18
  Author: svenstaro
Revision: 1243647

archrelease: copy trunk to community-x86_64

Added:
  python-pytorch/repos/community-x86_64/PKGBUILD
    (from rev 1243646, python-pytorch/trunk/PKGBUILD)
  python-pytorch/repos/community-x86_64/ffmpeg4.4.patch
    (from rev 1243646, python-pytorch/trunk/ffmpeg4.4.patch)
  python-pytorch/repos/community-x86_64/fix-building-for-torchvision.patch
    (from rev 1243646, python-pytorch/trunk/fix-building-for-torchvision.patch)
  python-pytorch/repos/community-x86_64/fix_include_system.patch
    (from rev 1243646, python-pytorch/trunk/fix_include_system.patch)
  python-pytorch/repos/community-x86_64/test.py
    (from rev 1243646, python-pytorch/trunk/test.py)
  python-pytorch/repos/community-x86_64/use-system-libuv.patch
    (from rev 1243646, python-pytorch/trunk/use-system-libuv.patch)
Deleted:
  python-pytorch/repos/community-x86_64/98f9ff90268ae62ab6d794cce0786121bf17edc9.patch
  python-pytorch/repos/community-x86_64/PKGBUILD
  python-pytorch/repos/community-x86_64/ffmpeg4.4.patch
  python-pytorch/repos/community-x86_64/fix-building-for-torchvision.patch
  python-pytorch/repos/community-x86_64/fix_include_system.patch
  python-pytorch/repos/community-x86_64/test.py
  python-pytorch/repos/community-x86_64/use-system-libuv.patch

------------------------------------------------+
 98f9ff90268ae62ab6d794cce0786121bf17edc9.patch |   44 -
 PKGBUILD                                       |  660 +++++++++++------------
 ffmpeg4.4.patch                                |  102 +--
 fix-building-for-torchvision.patch             |   50 -
 fix_include_system.patch                       |   26 
 test.py                                        |   14 
 use-system-libuv.patch                         |   26 
 7 files changed, 433 insertions(+), 489 deletions(-)

Deleted: 98f9ff90268ae62ab6d794cce0786121bf17edc9.patch
===================================================================
--- 98f9ff90268ae62ab6d794cce0786121bf17edc9.patch	2022-07-02 18:36:59 UTC (rev 1243646)
+++ 98f9ff90268ae62ab6d794cce0786121bf17edc9.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -1,44 +0,0 @@
-From 98f9ff90268ae62ab6d794cce0786121bf17edc9 Mon Sep 17 00:00:00 2001
-From: BowenBao <bowbao at microsoft.com>
-Date: Thu, 17 Feb 2022 10:45:24 -0800
-Subject: [PATCH] [ONNX] Fix an assertion failure involving Slice (#71965)
-
-Before this change, exporting a model to ONNX involving Slice crashes at `axes[i]` in line 153 if C++ assertions are enabled:
-```
-/usr/include/c++/11.1.0/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = long int; _Alloc = std::allocator<long int>; std::vector<_Tp, _Alloc>::reference = long int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.
-```
-The relevant check is https://github.com/gcc-mirror/gcc/blob/releases/gcc-11.1.0/libstdc++-v3/include/bits/stl_vector.h#L1045, which checks the vector index.
-
-The issue can be reproduced by exporting Mask R-CNN or similar ones. For example,
-```Python
-import io
-import torch
-import torchvision as tv
-
-model = tv.models.detection.maskrcnn_resnet50_fpn(pretrained=False)
-x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)]
-with io.BytesIO() as f:
-    torch.onnx.export(model, x, f, opset_version=11)
-```
-(extracted from [onnxoptimizer tests](https://github.com/onnx/optimizer/blob/master/onnxoptimizer/test/optimizer_test.py))
-
-Tested environment: Arch Linux x86_64 with pytorch and torchvisoin installed from [the official repo](https://github.com/archlinux/svntogit-community/blob/packages/python-pytorch/trunk/PKGBUILD) and [AUR](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-torchvision), respectively.
-
-Pull Request resolved: https://github.com/pytorch/pytorch/pull/72989
----
- torch/csrc/jit/passes/onnx/constant_fold.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/torch/csrc/jit/passes/onnx/constant_fold.cpp b/torch/csrc/jit/passes/onnx/constant_fold.cpp
-index 2901a9b8043c0..e52d77d04c756 100644
---- a/torch/csrc/jit/passes/onnx/constant_fold.cpp
-+++ b/torch/csrc/jit/passes/onnx/constant_fold.cpp
-@@ -147,7 +147,7 @@ c10::optional<at::Tensor> runTorchSlice_opset10(
-       return c10::nullopt;
-     }
-     auto axes_a = inputTensorValues[3].accessor<int64_t, 1>();
--    axes.reserve(inputTensorValues[3].sizes()[0]);
-+    axes.resize(inputTensorValues[3].sizes()[0]);
-     // ONNX slice accepts negative axis, fix this for aten op
-     for (const auto i : c10::irange(inputTensorValues[3].sizes()[0])) {
-       axes[i] = axes_a[i] < 0 ? axes_a[i] + inputTensorValues[0].sizes().size()

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-07-02 18:36:59 UTC (rev 1243646)
+++ PKGBUILD	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -1,336 +0,0 @@
-# Maintainer: Sven-Hendrik Haase <svenstaro at archlinux.org>
-# Contributor: Stephen Zhang <zsrkmyn at gmail dot com>
-
-_pkgname=pytorch
-pkgbase="python-${_pkgname}"
-pkgname=("${pkgbase}" "${pkgbase}-opt" "${pkgbase}-cuda" "${pkgbase}-opt-cuda")
-pkgver=1.11.0
-_pkgver=1.11.0
-pkgrel=11
-_pkgdesc='Tensors and Dynamic neural networks in Python with strong GPU acceleration'
-pkgdesc="${_pkgdesc}"
-arch=('x86_64')
-url="https://pytorch.org"
-license=('BSD')
-depends=('google-glog' 'gflags' 'opencv' 'openmp' 'nccl' 'pybind11' 'python' 'python-yaml' 'libuv'
-         'python-numpy' 'protobuf' 'ffmpeg4.4' 'python-future' 'qt5-base' 'onednn' 'intel-mkl'
-         'python-typing_extensions')
-makedepends=('python' 'python-setuptools' 'python-yaml' 'python-numpy' 'cmake' 'cuda'
-             'cudnn' 'git' 'magma' 'ninja' 'pkgconfig' 'doxygen' 'gcc11')
-source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#tag=v$_pkgver"
-        # generated using parse-submodules
-        # "${pkgname}::https://github.com/pytorch/pytorch#commit=7cc129e60c"
-        "${pkgname}-pthreadpool::git+https://github.com/Maratyszcza/pthreadpool.git"
-        "${pkgname}-NNPACK::git+https://github.com/Maratyszcza/NNPACK.git"
-        "${pkgname}-ios-cmake::git+https://github.com/Yangqing/ios-cmake.git"
-        "${pkgname}-psimd::git+https://github.com/Maratyszcza/psimd.git"
-        "${pkgname}-FXdiv::git+https://github.com/Maratyszcza/FXdiv.git"
-        "${pkgname}-FP16::git+https://github.com/Maratyszcza/FP16.git"
-        "${pkgname}-cub::git+https://github.com/NVlabs/cub.git"
-        "${pkgname}-eigen-git-mirror::git+https://github.com/eigenteam/eigen-git-mirror.git"
-        "${pkgname}-cpuinfo::git+https://github.com/pytorch/cpuinfo.git"
-        "${pkgname}-enum34::git+https://github.com/PeachPy/enum34.git"
-        "${pkgname}-PeachPy::git+https://github.com/Maratyszcza/PeachPy.git"
-        "${pkgname}-gloo::git+https://github.com/facebookincubator/gloo"
-        "${pkgname}-foxi::git+https://github.com/houseroad/foxi.git"
-        "${pkgname}-ideep::git+https://github.com/intel/ideep"
-        "${pkgname}-benchmark::git+https://github.com/google/benchmark.git"
-        "${pkgname}-QNNPACK::git+https://github.com/pytorch/QNNPACK"
-        "${pkgname}-six::git+https://github.com/benjaminp/six.git"
-        "${pkgname}-ARM_NEON_2_x86_SSE::git+https://github.com/intel/ARM_NEON_2_x86_SSE.git"
-        "${pkgname}-sleef::git+https://github.com/shibatch/sleef"
-        "${pkgname}-fbjni::git+https://github.com/facebookincubator/fbjni.git"
-        "${pkgname}-gemmlowp::git+https://github.com/google/gemmlowp.git"
-        "${pkgname}-onnx-tensorrt::git+https://github.com/onnx/onnx-tensorrt"
-        "${pkgname}-pocketfft::git+https://github.com/mreineck/pocketfft"
-        "${pkgname}-cudnn-frontend::git+https://github.com/NVIDIA/cudnn-frontend.git"
-        "${pkgname}-nccl::git+https://github.com/NVIDIA/nccl"
-        "${pkgname}-googletest::git+https://github.com/google/googletest.git"
-        "${pkgname}-pybind11::git+https://github.com/pybind/pybind11.git"
-        "${pkgname}-breakpad::git+https://github.com/driazati/breakpad.git"
-        "${pkgname}-zstd::git+https://github.com/facebook/zstd.git"
-        "${pkgname}-tbb::git+https://github.com/01org/tbb"
-        "${pkgname}-fbgemm::git+https://github.com/pytorch/fbgemm"
-        "${pkgname}-tensorpipe::git+https://github.com/pytorch/tensorpipe.git"
-        "${pkgname}-kineto::git+https://github.com/pytorch/kineto"
-        "${pkgname}-onnx::git+https://github.com/onnx/onnx.git"
-        "${pkgname}-fmt::git+https://github.com/fmtlib/fmt.git"
-        "${pkgname}-protobuf::git+https://github.com/protocolbuffers/protobuf.git"
-        "${pkgname}-XNNPACK::git+https://github.com/google/XNNPACK.git"
-        "${pkgname}-flatbuffers::git+https://github.com/google/flatbuffers.git"
-        fix_include_system.patch
-        use-system-libuv.patch
-        fix-building-for-torchvision.patch
-        98f9ff90268ae62ab6d794cce0786121bf17edc9.patch
-        ffmpeg4.4.patch)
-sha256sums=('SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            'SKIP'
-            '557761502bbd994d9795bef46779e4b8c60ba0b45e7d60841f477d3b7f28a00a'
-            'cd9ac4aaa9f946ac5eafc57cf66c5c16b3ea7ac8af32c2558fad0705411bb669'
-            '600bd6a4bbcec9f99ab815d82cee1c2875530b2b75f4010da5ba72ce9bf31aff'
-            'cf6ec8e4952765b190e1cae247a814dd1e6b3e9c8b3ad5600118d69d6faa6eb5'
-            '75001b59e76831b0c93a547f851cb980e00b0d8cc7b66fb507eaeac217dc6ff9')
-options=('!lto')
-
-get_pyver () {
-  python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
-}
-
-prepare() {
-  cd "${srcdir}/${_pkgname}-${pkgver}"
-
-  # generated using parse-submodules
-  git submodule init
-
-  git config submodule."third_party/pybind11".url "${srcdir}/${pkgname}"-pybind11
-  git config submodule."third_party/cub".url "${srcdir}/${pkgname}"-cub
-  git config submodule."third_party/eigen".url "${srcdir}/${pkgname}"-eigen-git-mirror
-  git config submodule."third_party/googletest".url "${srcdir}/${pkgname}"-googletest
-  git config submodule."third_party/benchmark".url "${srcdir}/${pkgname}"-benchmark
-  git config submodule."third_party/protobuf".url "${srcdir}/${pkgname}"-protobuf
-  git config submodule."third_party/ios-cmake".url "${srcdir}/${pkgname}"-ios-cmake
-  git config submodule."third_party/NNPACK".url "${srcdir}/${pkgname}"-NNPACK
-  git config submodule."third_party/gloo".url "${srcdir}/${pkgname}"-gloo
-  git config submodule."third_party/NNPACK_deps/pthreadpool".url "${srcdir}/${pkgname}"-pthreadpool
-  git config submodule."third_party/NNPACK_deps/FXdiv".url "${srcdir}/${pkgname}"-FXdiv
-  git config submodule."third_party/NNPACK_deps/FP16".url "${srcdir}/${pkgname}"-FP16
-  git config submodule."third_party/NNPACK_deps/psimd".url "${srcdir}/${pkgname}"-psimd
-  git config submodule."third_party/zstd".url "${srcdir}/${pkgname}"-zstd
-  git config submodule."third_party/cpuinfo".url "${srcdir}/${pkgname}"-cpuinfo
-  git config submodule."third_party/python-enum".url "${srcdir}/${pkgname}"-enum34
-  git config submodule."third_party/python-peachpy".url "${srcdir}/${pkgname}"-PeachPy
-  git config submodule."third_party/python-six".url "${srcdir}/${pkgname}"-six
-  git config submodule."third_party/onnx".url "${srcdir}/${pkgname}"-onnx
-  git config submodule."third_party/onnx-tensorrt".url "${srcdir}/${pkgname}"-onnx-tensorrt
-  git config submodule."third_party/sleef".url "${srcdir}/${pkgname}"-sleef
-  git config submodule."third_party/ideep".url "${srcdir}/${pkgname}"-ideep
-  git config submodule."third_party/nccl/nccl".url "${srcdir}/${pkgname}"-nccl
-  git config submodule."third_party/gemmlowp/gemmlowp".url "${srcdir}/${pkgname}"-gemmlowp
-  git config submodule."third_party/QNNPACK".url "${srcdir}/${pkgname}"-QNNPACK
-  git config submodule."third_party/neon2sse".url "${srcdir}/${pkgname}"-ARM_NEON_2_x86_SSE
-  git config submodule."third_party/fbgemm".url "${srcdir}/${pkgname}"-fbgemm
-  git config submodule."third_party/foxi".url "${srcdir}/${pkgname}"-foxi
-  git config submodule."third_party/tbb".url "${srcdir}/${pkgname}"-tbb
-  git config submodule."android/libs/fbjni".url "${srcdir}/${pkgname}"-fbjni
-  git config submodule."third_party/XNNPACK".url "${srcdir}/${pkgname}"-XNNPACK
-  git config submodule."third_party/fmt".url "${srcdir}/${pkgname}"-fmt
-  git config submodule."third_party/tensorpipe".url "${srcdir}/${pkgname}"-tensorpipe
-  git config submodule."third_party/cudnn_frontend".url "${srcdir}/${pkgname}"-cudnn-frontend
-  git config submodule."third_party/kineto".url "${srcdir}/${pkgname}"-kineto
-  git config submodule."third_party/pocketfft".url "${srcdir}/${pkgname}"-pocketfft
-  git config submodule."third_party/breakpad".url "${srcdir}/${pkgname}"-breakpad
-  git config submodule."third_party/flatbuffers".url "${srcdir}/${pkgname}"-flatbuffers
-
-  git submodule update --init --recursive
-
-  # https://bugs.archlinux.org/task/64981
-  patch -N torch/utils/cpp_extension.py "${srcdir}"/fix_include_system.patch
-
-  # Fix https://bugs.archlinux.org/task/74593
-  patch -Np1 -i "${srcdir}"/98f9ff90268ae62ab6d794cce0786121bf17edc9.patch
-
-  # Use system libuv
-  patch -Np1 -i "${srcdir}"/use-system-libuv.patch
-
-  # fix https://github.com/pytorch/vision/issues/3695
-  patch -Np1 -i "${srcdir}/fix-building-for-torchvision.patch"
-
-  # remove local nccl
-  # rm -rf third_party/nccl/nccl
-  # also remove path from nccl module, so it's not checked
-  # sed -e '/path = third_party\/nccl\/nccl/d' -i ./.gitmodules
-
-  # fix build with google-glog 0.5 https://github.com/pytorch/pytorch/issues/58054
-  sed -e '/namespace glog_internal_namespace_/d' -e 's|::glog_internal_namespace_||' -i c10/util/Logging.cpp
-
-  # build against ffmpeg4.4
-  patch -Np1 -i "${srcdir}/ffmpeg4.4.patch"
-
-  # Backport https://github.com/driazati/breakpad/commit/605c51ed96ad44b34c457bbca320e74e194c317e for fixing build with glibc > 2.33
-  git -C third_party/breakpad cherry-pick -n 605c51ed96ad44b34c457bbca320e74e194c317e
-
-  cd "${srcdir}"
-
-  cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt"
-  cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-cuda"
-  cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt-cuda"
-
-  export VERBOSE=1
-  export PYTORCH_BUILD_VERSION="${pkgver}"
-  export PYTORCH_BUILD_NUMBER=1
-
-  # Check tools/setup_helpers/cmake.py, setup.py and CMakeLists.txt for a list of flags that can be set via env vars.
-  export ATEN_NO_TEST=ON  # do not build ATen tests
-  export USE_MKLDNN=ON
-  export BUILD_CUSTOM_PROTOBUF=OFF
-  export BUILD_CAFFE2=ON
-  export BUILD_CAFFE2_OPS=ON
-  # export BUILD_SHARED_LIBS=OFF
-  export USE_FFMPEG=ON
-  export USE_GFLAGS=ON
-  export USE_GLOG=ON
-  export BUILD_BINARY=ON
-  export USE_OBSERVERS=ON
-  export USE_OPENCV=ON
-  # export USE_SYSTEM_LIBS=ON  # experimental, not all libs present in repos
-  export USE_SYSTEM_NCCL=ON
-  export NCCL_VERSION=$(pkg-config nccl --modversion)
-  export NCCL_VER_CODE=$(sed -n 's/^#define NCCL_VERSION_CODE\s*\(.*\).*/\1/p' /usr/include/nccl.h)
-  # export BUILD_SPLIT_CUDA=ON  # modern preferred build, but splits libs and symbols, ABI break
-  # export USE_FAST_NVCC=ON  # parallel build with nvcc, spawns too many processes
-  export USE_CUPTI_SO=ON  # make sure cupti.so is used as shared lib
-  export CC=/usr/bin/gcc-11
-  export CXX=/usr/bin/g++-11
-  export CUDAHOSTCXX=/usr/bin/g++-11
-  export CUDA_HOST_COMPILER="${CUDAHOSTCXX}"
-  export CUDA_HOME=/opt/cuda
-  # hide buildt-time CUDA devices
-  export CUDA_VISIBLE_DEVICES=""
-  export CUDNN_LIB_DIR=/usr/lib
-  export CUDNN_INCLUDE_DIR=/usr/include
-  export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
-  export TORCH_CUDA_ARCH_LIST="5.2;6.0;6.2;7.0;7.2;7.5;8.0;8.6;8.6+PTX"  #include latest PTX for future compat
-  export OVERRIDE_TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST}"
-}
-
-build() {
-  echo "Building without cuda and without non-x86-64 optimizations"
-  export USE_CUDA=0
-  export USE_CUDNN=0
-  cd "${srcdir}/${_pkgname}-${pkgver}"
-  echo "add_definitions(-march=x86-64)" >> cmake/MiscCheck.cmake
-  # this horrible hack is necessary because the current release
-  # ships inconsistent CMake which tries to build objects before
-  # thier dependencies, build twice when dependencies are available
-  python setup.py build || python setup.py build
-
-  echo "Building without cuda and with non-x86-64 optimizations"
-  export USE_CUDA=0
-  export USE_CUDNN=0
-  cd "${srcdir}/${_pkgname}-${pkgver}-opt"
-  echo "add_definitions(-march=haswell)" >> cmake/MiscCheck.cmake
-  # same horrible hack as above
-  python setup.py build || python setup.py build
-
-  echo "Building with cuda and without non-x86-64 optimizations"
-  export USE_CUDA=1
-  export USE_CUDNN=1
-  cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
-  echo "add_definitions(-march=x86-64)" >> cmake/MiscCheck.cmake
-  # same horrible hack as above
-  python setup.py build || python setup.py build
-
-  echo "Building with cuda and with non-x86-64 optimizations"
-  export USE_CUDA=1
-  export USE_CUDNN=1
-  cd "${srcdir}/${_pkgname}-${pkgver}-opt-cuda"
-  echo "add_definitions(-march=haswell)" >> cmake/MiscCheck.cmake
-  # same horrible hack as above
-  python setup.py build || python setup.py build
-}
-
-_package() {
-  # Prevent setup.py from re-running CMake and rebuilding
-  sed -e 's/RUN_BUILD_DEPS = True/RUN_BUILD_DEPS = False/g' -i setup.py
-
-  python setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
-
-  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
-  pytorchpath="usr/lib/python$(get_pyver)/site-packages/torch"
-  install -d "${pkgdir}/usr/lib"
-
-  # put CMake files in correct place
-  mv "${pkgdir}/${pytorchpath}/share/cmake" "${pkgdir}/usr/lib/cmake"
-
-  # put C++ API in correct place
-  mv "${pkgdir}/${pytorchpath}/include" "${pkgdir}/usr/include"
-  mv "${pkgdir}/${pytorchpath}/lib"/*.so* "${pkgdir}/usr/lib/"
-
-  # clean up duplicates
-  # TODO: move towards direct shared library dependecy of:
-  #   c10, caffe2, libcpuinfo, CUDA RT, gloo, GTest, Intel MKL,
-  #   NVRTC, ONNX, protobuf, libthreadpool, QNNPACK
-  rm -rf "${pkgdir}/usr/include/pybind11"
-
-  # python module is hardcoded to look there at runtime
-  ln -s /usr/include "${pkgdir}/${pytorchpath}/include"
-  find "${pkgdir}"/usr/lib -type f -name "*.so*" -print0 | while read -rd $'\0' _lib; do
-    ln -s ${_lib#"$pkgdir"} "${pkgdir}/${pytorchpath}/lib/"
-  done
-}
-
-package_python-pytorch() {
-  pkgdesc="${_pkgdesc}"
-
-  cd "${srcdir}/${_pkgname}-${pkgver}"
-  _package
-}
-
-package_python-pytorch-opt() {
-  pkgdesc="${_pkgdesc} (with AVX2 CPU optimizations)"
-  conflicts=(python-pytorch)
-  provides=(python-pytorch)
-
-  cd "${srcdir}/${_pkgname}-${pkgver}-opt"
-  _package
-}
-
-package_python-pytorch-cuda() {
-  pkgdesc="${_pkgdesc} (with CUDA)"
-  depends+=(cuda cudnn magma)
-  conflicts=(python-pytorch)
-  provides=(python-pytorch)
-
-  cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
-  _package
-}
-
-package_python-pytorch-opt-cuda() {
-  pkgdesc="${_pkgdesc} (with CUDA and AVX2 CPU optimizations)"
-  depends+=(cuda cudnn magma)
-  conflicts=(python-pytorch)
-  provides=(python-pytorch python-pytorch-cuda)
-
-  cd "${srcdir}/${_pkgname}-${pkgver}-opt-cuda"
-  _package
-}
-
-# vim:set ts=2 sw=2 et:

Copied: python-pytorch/repos/community-x86_64/PKGBUILD (from rev 1243646, python-pytorch/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -0,0 +1,324 @@
+# Maintainer: Sven-Hendrik Haase <svenstaro at archlinux.org>
+# Contributor: Stephen Zhang <zsrkmyn at gmail dot com>
+
+_pkgname=pytorch
+pkgbase="python-${_pkgname}"
+pkgname=("${pkgbase}" "${pkgbase}-opt" "${pkgbase}-cuda" "${pkgbase}-opt-cuda")
+pkgver=1.12.0
+_pkgver=1.12.0
+pkgrel=1
+_pkgdesc='Tensors and Dynamic neural networks in Python with strong GPU acceleration'
+pkgdesc="${_pkgdesc}"
+arch=('x86_64')
+url="https://pytorch.org"
+license=('BSD')
+depends=('google-glog' 'gflags' 'opencv' 'openmp' 'nccl' 'pybind11' 'python' 'python-yaml' 'libuv'
+         'python-numpy' 'protobuf' 'ffmpeg4.4' 'python-future' 'qt5-base' 'onednn' 'intel-mkl'
+         'python-typing_extensions')
+makedepends=('python' 'python-setuptools' 'python-yaml' 'python-numpy' 'cmake' 'cuda'
+             'cudnn' 'git' 'magma' 'ninja' 'pkgconfig' 'doxygen' 'gcc11')
+source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#tag=v$_pkgver"
+        # generated using parse-submodules
+        "${pkgname}-ios-cmake::git+https://github.com/Yangqing/ios-cmake.git"
+        "${pkgname}-pthreadpool::git+https://github.com/Maratyszcza/pthreadpool.git"
+        "${pkgname}-NNPACK::git+https://github.com/Maratyszcza/NNPACK.git"
+        "${pkgname}-psimd::git+https://github.com/Maratyszcza/psimd.git"
+        "${pkgname}-FP16::git+https://github.com/Maratyszcza/FP16.git"
+        "${pkgname}-FXdiv::git+https://github.com/Maratyszcza/FXdiv.git"
+        "${pkgname}-cpuinfo::git+https://github.com/pytorch/cpuinfo.git"
+        "${pkgname}-enum34::git+https://github.com/PeachPy/enum34.git"
+        "${pkgname}-gloo::git+https://github.com/facebookincubator/gloo"
+        "${pkgname}-PeachPy::git+https://github.com/malfet/PeachPy.git"
+        "${pkgname}-cub::git+https://github.com/NVlabs/cub.git"
+        "${pkgname}-six::git+https://github.com/benjaminp/six.git"
+        "${pkgname}-QNNPACK::git+https://github.com/pytorch/QNNPACK"
+        "${pkgname}-ARM_NEON_2_x86_SSE::git+https://github.com/intel/ARM_NEON_2_x86_SSE.git"
+        "${pkgname}-onnx-tensorrt::git+https://github.com/onnx/onnx-tensorrt"
+        "${pkgname}-ideep::git+https://github.com/intel/ideep"
+        "${pkgname}-sleef::git+https://github.com/shibatch/sleef"
+        "${pkgname}-foxi::git+https://github.com/houseroad/foxi.git"
+        "${pkgname}-benchmark::git+https://github.com/google/benchmark.git"
+        "${pkgname}-nccl::git+https://github.com/NVIDIA/nccl"
+        "${pkgname}-gemmlowp::git+https://github.com/google/gemmlowp.git"
+        "${pkgname}-cudnn-frontend::git+https://github.com/NVIDIA/cudnn-frontend.git"
+        "${pkgname}-googletest::git+https://github.com/google/googletest.git"
+        "${pkgname}-fbjni::git+https://github.com/facebookincubator/fbjni.git"
+        "${pkgname}-pocketfft::git+https://github.com/mreineck/pocketfft"
+        "${pkgname}-fbgemm::git+https://github.com/pytorch/fbgemm"
+        "${pkgname}-tensorpipe::git+https://github.com/pytorch/tensorpipe.git"
+        "${pkgname}-onnx::git+https://github.com/onnx/onnx.git"
+        "${pkgname}-tbb::git+https://github.com/01org/tbb"
+        "${pkgname}-fmt::git+https://github.com/fmtlib/fmt.git"
+        "${pkgname}-kineto::git+https://github.com/pytorch/kineto"
+        "${pkgname}-protobuf::git+https://github.com/protocolbuffers/protobuf.git"
+        "${pkgname}-json::git+https://github.com/nlohmann/json.git"
+        "${pkgname}-eigen::git+https://gitlab.com/libeigen/eigen.git"
+        "${pkgname}-flatbuffers::git+https://github.com/google/flatbuffers.git"
+        "${pkgname}-XNNPACK::git+https://github.com/google/XNNPACK.git"
+        "${pkgname}-pybind11::git+https://github.com/pybind/pybind11.git"
+        "${pkgname}-zstd::git+https://github.com/facebook/zstd.git"
+        fix_include_system.patch
+        use-system-libuv.patch
+        fix-building-for-torchvision.patch
+        https://patch-diff.githubusercontent.com/raw/pytorch/pytorch/pull/79360.patch
+        ffmpeg4.4.patch)
+sha256sums=('SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            'SKIP'
+            '557761502bbd994d9795bef46779e4b8c60ba0b45e7d60841f477d3b7f28a00a'
+            'cd9ac4aaa9f946ac5eafc57cf66c5c16b3ea7ac8af32c2558fad0705411bb669'
+            '600bd6a4bbcec9f99ab815d82cee1c2875530b2b75f4010da5ba72ce9bf31aff'
+            'bd89e94fd077b2e2bf04ffb0794f5bcb68379a6abcd4339aa99e9bba9fe4edec'
+            '75001b59e76831b0c93a547f851cb980e00b0d8cc7b66fb507eaeac217dc6ff9')
+options=('!lto')
+
+get_pyver () {
+  python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
+}
+
+prepare() {
+  cd "${srcdir}/${_pkgname}-${pkgver}"
+
+  # generated using parse-submodules
+  git submodule init
+
+  git config submodule."third_party/pybind11".url "${srcdir}/${pkgname}"-pybind11
+  git config submodule."third_party/cub".url "${srcdir}/${pkgname}"-cub
+  git config submodule."third_party/eigen".url "${srcdir}/${pkgname}"-eigen
+  git config submodule."third_party/googletest".url "${srcdir}/${pkgname}"-googletest
+  git config submodule."third_party/benchmark".url "${srcdir}/${pkgname}"-benchmark
+  git config submodule."third_party/protobuf".url "${srcdir}/${pkgname}"-protobuf
+  git config submodule."third_party/ios-cmake".url "${srcdir}/${pkgname}"-ios-cmake
+  git config submodule."third_party/NNPACK".url "${srcdir}/${pkgname}"-NNPACK
+  git config submodule."third_party/gloo".url "${srcdir}/${pkgname}"-gloo
+  git config submodule."third_party/NNPACK_deps/pthreadpool".url "${srcdir}/${pkgname}"-pthreadpool
+  git config submodule."third_party/NNPACK_deps/FXdiv".url "${srcdir}/${pkgname}"-FXdiv
+  git config submodule."third_party/NNPACK_deps/FP16".url "${srcdir}/${pkgname}"-FP16
+  git config submodule."third_party/NNPACK_deps/psimd".url "${srcdir}/${pkgname}"-psimd
+  git config submodule."third_party/zstd".url "${srcdir}/${pkgname}"-zstd
+  git config submodule."third_party/cpuinfo".url "${srcdir}/${pkgname}"-cpuinfo
+  git config submodule."third_party/python-enum".url "${srcdir}/${pkgname}"-enum34
+  git config submodule."third_party/python-peachpy".url "${srcdir}/${pkgname}"-PeachPy
+  git config submodule."third_party/python-six".url "${srcdir}/${pkgname}"-six
+  git config submodule."third_party/onnx".url "${srcdir}/${pkgname}"-onnx
+  git config submodule."third_party/onnx-tensorrt".url "${srcdir}/${pkgname}"-onnx-tensorrt
+  git config submodule."third_party/sleef".url "${srcdir}/${pkgname}"-sleef
+  git config submodule."third_party/ideep".url "${srcdir}/${pkgname}"-ideep
+  git config submodule."third_party/nccl/nccl".url "${srcdir}/${pkgname}"-nccl
+  git config submodule."third_party/gemmlowp/gemmlowp".url "${srcdir}/${pkgname}"-gemmlowp
+  git config submodule."third_party/QNNPACK".url "${srcdir}/${pkgname}"-QNNPACK
+  git config submodule."third_party/neon2sse".url "${srcdir}/${pkgname}"-ARM_NEON_2_x86_SSE
+  git config submodule."third_party/fbgemm".url "${srcdir}/${pkgname}"-fbgemm
+  git config submodule."third_party/foxi".url "${srcdir}/${pkgname}"-foxi
+  git config submodule."third_party/tbb".url "${srcdir}/${pkgname}"-tbb
+  git config submodule."android/libs/fbjni".url "${srcdir}/${pkgname}"-fbjni
+  git config submodule."third_party/XNNPACK".url "${srcdir}/${pkgname}"-XNNPACK
+  git config submodule."third_party/fmt".url "${srcdir}/${pkgname}"-fmt
+  git config submodule."third_party/tensorpipe".url "${srcdir}/${pkgname}"-tensorpipe
+  git config submodule."third_party/cudnn_frontend".url "${srcdir}/${pkgname}"-cudnn-frontend
+  git config submodule."third_party/kineto".url "${srcdir}/${pkgname}"-kineto
+  git config submodule."third_party/pocketfft".url "${srcdir}/${pkgname}"-pocketfft
+  git config submodule."third_party/flatbuffers".url "${srcdir}/${pkgname}"-flatbuffers
+  git config submodule."third_party/nlohmann".url "${srcdir}/${pkgname}"-json
+
+  git submodule update --init --recursive
+
+  # https://bugs.archlinux.org/task/64981
+  patch -N torch/utils/cpp_extension.py "${srcdir}"/fix_include_system.patch
+
+  # Use system libuv
+  patch -Np1 -i "${srcdir}"/use-system-libuv.patch
+
+  # fix https://github.com/pytorch/vision/issues/3695
+  patch -Np1 -i "${srcdir}/fix-building-for-torchvision.patch"
+
+  # Fix building against glog 0.6
+  patch -Np1 -i "${srcdir}/79360.patch"
+
+  # build against ffmpeg4.4
+  patch -Np1 -i "${srcdir}/ffmpeg4.4.patch"
+
+  cd "${srcdir}"
+
+  cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt"
+  cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-cuda"
+  cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt-cuda"
+
+  export VERBOSE=1
+  export PYTORCH_BUILD_VERSION="${pkgver}"
+  export PYTORCH_BUILD_NUMBER=1
+
+  # Check tools/setup_helpers/cmake.py, setup.py and CMakeLists.txt for a list of flags that can be set via env vars.
+  export ATEN_NO_TEST=ON  # do not build ATen tests
+  export USE_MKLDNN=ON
+  export BUILD_CUSTOM_PROTOBUF=OFF
+  export BUILD_CAFFE2=ON
+  export BUILD_CAFFE2_OPS=ON
+  # export BUILD_SHARED_LIBS=OFF
+  export USE_FFMPEG=ON
+  export USE_GFLAGS=ON
+  export USE_GLOG=ON
+  export BUILD_BINARY=ON
+  export USE_OBSERVERS=ON
+  export USE_OPENCV=ON
+  # export USE_SYSTEM_LIBS=ON  # experimental, not all libs present in repos
+  export USE_SYSTEM_NCCL=ON
+  export NCCL_VERSION=$(pkg-config nccl --modversion)
+  export NCCL_VER_CODE=$(sed -n 's/^#define NCCL_VERSION_CODE\s*\(.*\).*/\1/p' /usr/include/nccl.h)
+  # export BUILD_SPLIT_CUDA=ON  # modern preferred build, but splits libs and symbols, ABI break
+  # export USE_FAST_NVCC=ON  # parallel build with nvcc, spawns too many processes
+  export USE_CUPTI_SO=ON  # make sure cupti.so is used as shared lib
+  export CC=/usr/bin/gcc-11
+  export CXX=/usr/bin/g++-11
+  export CUDAHOSTCXX=/usr/bin/g++-11
+  export CUDA_HOST_COMPILER="${CUDAHOSTCXX}"
+  export CUDA_HOME=/opt/cuda
+  # hide buildt-time CUDA devices
+  export CUDA_VISIBLE_DEVICES=""
+  export CUDNN_LIB_DIR=/usr/lib
+  export CUDNN_INCLUDE_DIR=/usr/include
+  export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
+  export TORCH_CUDA_ARCH_LIST="5.2;6.0;6.2;7.0;7.2;7.5;8.0;8.6;8.6+PTX"  #include latest PTX for future compat
+  export OVERRIDE_TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST}"
+}
+
+build() {
+  echo "Building without cuda and without non-x86-64 optimizations"
+  export USE_CUDA=0
+  export USE_CUDNN=0
+  cd "${srcdir}/${_pkgname}-${pkgver}"
+  echo "add_definitions(-march=x86-64)" >> cmake/MiscCheck.cmake
+  # this horrible hack is necessary because the current release
+  # ships inconsistent CMake which tries to build objects before
+  # thier dependencies, build twice when dependencies are available
+  python setup.py build || python setup.py build
+
+  echo "Building without cuda and with non-x86-64 optimizations"
+  export USE_CUDA=0
+  export USE_CUDNN=0
+  cd "${srcdir}/${_pkgname}-${pkgver}-opt"
+  echo "add_definitions(-march=haswell)" >> cmake/MiscCheck.cmake
+  # same horrible hack as above
+  python setup.py build || python setup.py build
+
+  echo "Building with cuda and without non-x86-64 optimizations"
+  export USE_CUDA=1
+  export USE_CUDNN=1
+  cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
+  echo "add_definitions(-march=x86-64)" >> cmake/MiscCheck.cmake
+  # same horrible hack as above
+  python setup.py build || python setup.py build
+
+  echo "Building with cuda and with non-x86-64 optimizations"
+  export USE_CUDA=1
+  export USE_CUDNN=1
+  cd "${srcdir}/${_pkgname}-${pkgver}-opt-cuda"
+  echo "add_definitions(-march=haswell)" >> cmake/MiscCheck.cmake
+  # same horrible hack as above
+  python setup.py build || python setup.py build
+}
+
+_package() {
+  # Prevent setup.py from re-running CMake and rebuilding
+  sed -e 's/RUN_BUILD_DEPS = True/RUN_BUILD_DEPS = False/g' -i setup.py
+
+  python setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
+
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+  pytorchpath="usr/lib/python$(get_pyver)/site-packages/torch"
+  install -d "${pkgdir}/usr/lib"
+
+  # put CMake files in correct place
+  mv "${pkgdir}/${pytorchpath}/share/cmake" "${pkgdir}/usr/lib/cmake"
+
+  # put C++ API in correct place
+  mv "${pkgdir}/${pytorchpath}/include" "${pkgdir}/usr/include"
+  mv "${pkgdir}/${pytorchpath}/lib"/*.so* "${pkgdir}/usr/lib/"
+
+  # clean up duplicates
+  # TODO: move towards direct shared library dependecy of:
+  #   c10, caffe2, libcpuinfo, CUDA RT, gloo, GTest, Intel MKL,
+  #   NVRTC, ONNX, protobuf, libthreadpool, QNNPACK
+  rm -rf "${pkgdir}/usr/include/pybind11"
+
+  # python module is hardcoded to look there at runtime
+  ln -s /usr/include "${pkgdir}/${pytorchpath}/include"
+  find "${pkgdir}"/usr/lib -type f -name "*.so*" -print0 | while read -rd $'\0' _lib; do
+    ln -s ${_lib#"$pkgdir"} "${pkgdir}/${pytorchpath}/lib/"
+  done
+}
+
+package_python-pytorch() {
+  pkgdesc="${_pkgdesc}"
+
+  cd "${srcdir}/${_pkgname}-${pkgver}"
+  _package
+}
+
+package_python-pytorch-opt() {
+  pkgdesc="${_pkgdesc} (with AVX2 CPU optimizations)"
+  conflicts=(python-pytorch)
+  provides=(python-pytorch)
+
+  cd "${srcdir}/${_pkgname}-${pkgver}-opt"
+  _package
+}
+
+package_python-pytorch-cuda() {
+  pkgdesc="${_pkgdesc} (with CUDA)"
+  depends+=(cuda cudnn magma)
+  conflicts=(python-pytorch)
+  provides=(python-pytorch)
+
+  cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
+  _package
+}
+
+package_python-pytorch-opt-cuda() {
+  pkgdesc="${_pkgdesc} (with CUDA and AVX2 CPU optimizations)"
+  depends+=(cuda cudnn magma)
+  conflicts=(python-pytorch)
+  provides=(python-pytorch python-pytorch-cuda)
+
+  cd "${srcdir}/${_pkgname}-${pkgver}-opt-cuda"
+  _package
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: ffmpeg4.4.patch
===================================================================
--- ffmpeg4.4.patch	2022-07-02 18:36:59 UTC (rev 1243646)
+++ ffmpeg4.4.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -1,51 +0,0 @@
-diff --git a/cmake/Modules/FindFFmpeg.cmake b/cmake/Modules/FindFFmpeg.cmake
-index 04437562ee..dc8fe4aa5c 100644
---- a/cmake/Modules/FindFFmpeg.cmake
-+++ b/cmake/Modules/FindFFmpeg.cmake
-@@ -14,34 +14,40 @@ else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)
- 
-   find_path(FFMPEG_AVCODEC_INCLUDE_DIR
-     NAMES libavcodec/avcodec.h
--    PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS} /usr/include /usr/local/include /opt/local/include /sw/include
-+    PATHS /usr/include/ffmpeg4.4 /usr/local/include /opt/local/include /sw/include
-     PATH_SUFFIXES ffmpeg libav
-+    NO_DEFAULT_PATH
-   )
- 
-   find_library(FFMPEG_LIBAVCODEC
-     NAMES avcodec
--    PATHS ${_FFMPEG_AVCODEC_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
-+    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
-+    NO_DEFAULT_PATH
-   )
- 
-   find_library(FFMPEG_LIBAVFORMAT
-     NAMES avformat
--    PATHS ${_FFMPEG_AVFORMAT_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
-+    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
-+    NO_DEFAULT_PATH
-   )
- 
-   find_library(FFMPEG_LIBAVUTIL
-     NAMES avutil
--    PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
-+    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
-+    NO_DEFAULT_PATH
-   )
- 
- 
-   find_library(FFMPEG_LIBSWSCALE
-     NAMES swscale
--    PATHS ${_FFMPEG_SWSCALE_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
-+    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
-+    NO_DEFAULT_PATH
-   )
- 
-   find_library(FFMPEG_LIBSWRESAMPLE
-     NAMES swresample
--    PATHS ${_FFMPEG_SWSCALE_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
-+    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
-+    NO_DEFAULT_PATH
-   )
- 
-   if (FFMPEG_LIBAVCODEC AND FFMPEG_LIBAVFORMAT)

Copied: python-pytorch/repos/community-x86_64/ffmpeg4.4.patch (from rev 1243646, python-pytorch/trunk/ffmpeg4.4.patch)
===================================================================
--- ffmpeg4.4.patch	                        (rev 0)
+++ ffmpeg4.4.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -0,0 +1,51 @@
+diff --git a/cmake/Modules/FindFFmpeg.cmake b/cmake/Modules/FindFFmpeg.cmake
+index 04437562ee..dc8fe4aa5c 100644
+--- a/cmake/Modules/FindFFmpeg.cmake
++++ b/cmake/Modules/FindFFmpeg.cmake
+@@ -14,34 +14,40 @@ else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)
+ 
+   find_path(FFMPEG_AVCODEC_INCLUDE_DIR
+     NAMES libavcodec/avcodec.h
+-    PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS} /usr/include /usr/local/include /opt/local/include /sw/include
++    PATHS /usr/include/ffmpeg4.4 /usr/local/include /opt/local/include /sw/include
+     PATH_SUFFIXES ffmpeg libav
++    NO_DEFAULT_PATH
+   )
+ 
+   find_library(FFMPEG_LIBAVCODEC
+     NAMES avcodec
+-    PATHS ${_FFMPEG_AVCODEC_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++    NO_DEFAULT_PATH
+   )
+ 
+   find_library(FFMPEG_LIBAVFORMAT
+     NAMES avformat
+-    PATHS ${_FFMPEG_AVFORMAT_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++    NO_DEFAULT_PATH
+   )
+ 
+   find_library(FFMPEG_LIBAVUTIL
+     NAMES avutil
+-    PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++    NO_DEFAULT_PATH
+   )
+ 
+ 
+   find_library(FFMPEG_LIBSWSCALE
+     NAMES swscale
+-    PATHS ${_FFMPEG_SWSCALE_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++    NO_DEFAULT_PATH
+   )
+ 
+   find_library(FFMPEG_LIBSWRESAMPLE
+     NAMES swresample
+-    PATHS ${_FFMPEG_SWSCALE_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
++    PATHS /usr/lib/ffmpeg4.4 /usr/local/lib /opt/local/lib /sw/lib
++    NO_DEFAULT_PATH
+   )
+ 
+   if (FFMPEG_LIBAVCODEC AND FFMPEG_LIBAVFORMAT)

Deleted: fix-building-for-torchvision.patch
===================================================================
--- fix-building-for-torchvision.patch	2022-07-02 18:36:59 UTC (rev 1243646)
+++ fix-building-for-torchvision.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -1,25 +0,0 @@
-From 011495d8045c44527fbd7796ce860618120ae127 Mon Sep 17 00:00:00 2001
-From: Butui Hu <hot123tea123 at gmail.com>
-Date: Fri, 30 Apr 2021 11:36:30 +0800
-Subject: [PATCH] fix building torchvision
-
----
- aten/src/ATen/core/op_registration/op_allowlist.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/aten/src/ATen/core/op_registration/op_allowlist.h b/aten/src/ATen/core/op_registration/op_allowlist.h
-index f93462bb2cf..12903d1cc09 100644
---- a/aten/src/ATen/core/op_registration/op_allowlist.h
-+++ b/aten/src/ATen/core/op_registration/op_allowlist.h
-@@ -59,7 +59,7 @@ constexpr bool op_allowlist_contains(string_view allowlist, string_view item) {
- // Returns true iff the given op name is on the allowlist
- // and should be registered
- constexpr bool op_allowlist_check(string_view op_name) {
--  assert(op_name.find("::") != string_view::npos);
-+//  assert(op_name.find("::") != string_view::npos);
-   // Use assert() instead of throw() due to a gcc bug. See:
-   // https://stackoverflow.com/questions/34280729/throw-in-constexpr-function
-   // https://github.com/fmtlib/fmt/issues/682
--- 
-2.31.1
-

Copied: python-pytorch/repos/community-x86_64/fix-building-for-torchvision.patch (from rev 1243646, python-pytorch/trunk/fix-building-for-torchvision.patch)
===================================================================
--- fix-building-for-torchvision.patch	                        (rev 0)
+++ fix-building-for-torchvision.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -0,0 +1,25 @@
+From 011495d8045c44527fbd7796ce860618120ae127 Mon Sep 17 00:00:00 2001
+From: Butui Hu <hot123tea123 at gmail.com>
+Date: Fri, 30 Apr 2021 11:36:30 +0800
+Subject: [PATCH] fix building torchvision
+
+---
+ aten/src/ATen/core/op_registration/op_allowlist.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/aten/src/ATen/core/op_registration/op_allowlist.h b/aten/src/ATen/core/op_registration/op_allowlist.h
+index f93462bb2cf..12903d1cc09 100644
+--- a/aten/src/ATen/core/op_registration/op_allowlist.h
++++ b/aten/src/ATen/core/op_registration/op_allowlist.h
+@@ -59,7 +59,7 @@ constexpr bool op_allowlist_contains(string_view allowlist, string_view item) {
+ // Returns true iff the given op name is on the allowlist
+ // and should be registered
+ constexpr bool op_allowlist_check(string_view op_name) {
+-  assert(op_name.find("::") != string_view::npos);
++//  assert(op_name.find("::") != string_view::npos);
+   // Use assert() instead of throw() due to a gcc bug. See:
+   // https://stackoverflow.com/questions/34280729/throw-in-constexpr-function
+   // https://github.com/fmtlib/fmt/issues/682
+-- 
+2.31.1
+

Deleted: fix_include_system.patch
===================================================================
--- fix_include_system.patch	2022-07-02 18:36:59 UTC (rev 1243646)
+++ fix_include_system.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -1,13 +0,0 @@
-diff --git a/torch/utils/cpp_extension.py b/torch/utils/cpp_extension.py
-index ca673033e1..c79ce8d37b 100644
---- a/torch/utils/cpp_extension.py
-+++ b/torch/utils/cpp_extension.py
-@@ -1760,7 +1760,7 @@ def _write_ninja_file_to_build_library(path,
-             common_cflags.append(f'-DPYBIND11_{pname}=\\"{pval}\\"')
- 
-     common_cflags += [f'-I{include}' for include in user_includes]
--    common_cflags += [f'-isystem {include}' for include in system_includes]
-+    common_cflags += [f'-I{include}' for include in system_includes]
- 
-     common_cflags += ['-D_GLIBCXX_USE_CXX11_ABI=' + str(int(torch._C._GLIBCXX_USE_CXX11_ABI))]
- 

Copied: python-pytorch/repos/community-x86_64/fix_include_system.patch (from rev 1243646, python-pytorch/trunk/fix_include_system.patch)
===================================================================
--- fix_include_system.patch	                        (rev 0)
+++ fix_include_system.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -0,0 +1,13 @@
+diff --git a/torch/utils/cpp_extension.py b/torch/utils/cpp_extension.py
+index ca673033e1..c79ce8d37b 100644
+--- a/torch/utils/cpp_extension.py
++++ b/torch/utils/cpp_extension.py
+@@ -1760,7 +1760,7 @@ def _write_ninja_file_to_build_library(path,
+             common_cflags.append(f'-DPYBIND11_{pname}=\\"{pval}\\"')
+ 
+     common_cflags += [f'-I{include}' for include in user_includes]
+-    common_cflags += [f'-isystem {include}' for include in system_includes]
++    common_cflags += [f'-I{include}' for include in system_includes]
+ 
+     common_cflags += ['-D_GLIBCXX_USE_CXX11_ABI=' + str(int(torch._C._GLIBCXX_USE_CXX11_ABI))]
+ 

Deleted: test.py
===================================================================
--- test.py	2022-07-02 18:36:59 UTC (rev 1243646)
+++ test.py	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -1,7 +0,0 @@
-#!/usr/bin/env python
-
-import torch
-
-d = torch.device('cuda')
-a = torch.rand(1, 2).to(d)
-print(a + 0)

Copied: python-pytorch/repos/community-x86_64/test.py (from rev 1243646, python-pytorch/trunk/test.py)
===================================================================
--- test.py	                        (rev 0)
+++ test.py	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+import torch
+
+d = torch.device('cuda')
+a = torch.rand(1, 2).to(d)
+print(a + 0)

Deleted: use-system-libuv.patch
===================================================================
--- use-system-libuv.patch	2022-07-02 18:36:59 UTC (rev 1243646)
+++ use-system-libuv.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -1,13 +0,0 @@
-diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
-index 06464e799a..93410bc210 100644
---- a/cmake/Dependencies.cmake
-+++ b/cmake/Dependencies.cmake
-@@ -1346,7 +1346,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
-       set(TP_USE_CUDA ON CACHE BOOL "" FORCE)
-       set(TP_ENABLE_CUDA_IPC ON CACHE BOOL "" FORCE)
-     endif()
--    set(TP_BUILD_LIBUV ON CACHE BOOL "" FORCE)
-+    set(TP_BUILD_LIBUV OFF CACHE BOOL "" FORCE)
-     set(TP_STATIC_OR_SHARED STATIC CACHE STRING "" FORCE)
- 
-     add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe)

Copied: python-pytorch/repos/community-x86_64/use-system-libuv.patch (from rev 1243646, python-pytorch/trunk/use-system-libuv.patch)
===================================================================
--- use-system-libuv.patch	                        (rev 0)
+++ use-system-libuv.patch	2022-07-02 18:37:18 UTC (rev 1243647)
@@ -0,0 +1,13 @@
+diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
+index 06464e799a..93410bc210 100644
+--- a/cmake/Dependencies.cmake
++++ b/cmake/Dependencies.cmake
+@@ -1346,7 +1346,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
+       set(TP_USE_CUDA ON CACHE BOOL "" FORCE)
+       set(TP_ENABLE_CUDA_IPC ON CACHE BOOL "" FORCE)
+     endif()
+-    set(TP_BUILD_LIBUV ON CACHE BOOL "" FORCE)
++    set(TP_BUILD_LIBUV OFF CACHE BOOL "" FORCE)
+     set(TP_STATIC_OR_SHARED STATIC CACHE STRING "" FORCE)
+ 
+     add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe)



More information about the arch-commits mailing list