[arch-commits] Commit in python-pytorch/trunk (24143.patch PKGBUILD)
Konstantin Gizdov
kgizdov at archlinux.org
Tue Oct 15 07:46:38 UTC 2019
Date: Tuesday, October 15, 2019 @ 07:46:37
Author: kgizdov
Revision: 516100
upgpkg: python-pytorch 1.3.0-1
Modified:
python-pytorch/trunk/PKGBUILD
Deleted:
python-pytorch/trunk/24143.patch
-------------+
24143.patch | 38 --------------------------------------
PKGBUILD | 18 +++++++++---------
2 files changed, 9 insertions(+), 47 deletions(-)
Deleted: 24143.patch
===================================================================
--- 24143.patch 2019-10-15 07:46:36 UTC (rev 516099)
+++ 24143.patch 2019-10-15 07:46:37 UTC (rev 516100)
@@ -1,38 +0,0 @@
-From 16d00e3e701b18124166d8a26c592e1d24e33737 Mon Sep 17 00:00:00 2001
-From: Leo Mao <leomaoyw at gmail.com>
-Date: Sat, 10 Aug 2019 13:11:12 +0800
-Subject: [PATCH] opencv 4 compatibility fix for caffe2/video
-
----
- caffe2/video/video_input_op.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/caffe2/video/video_input_op.h b/caffe2/video/video_input_op.h
-index b047eb68326a..850462761156 100644
---- a/caffe2/video/video_input_op.h
-+++ b/caffe2/video/video_input_op.h
-@@ -573,7 +573,7 @@ bool VideoInputOp<Context>::GetImageAndLabelsFromDBValue(
- &encoded_size,
- CV_8UC1,
- const_cast<char*>(encoded_image_str.data())),
-- CV_LOAD_IMAGE_COLOR);
-+ cv::IMREAD_COLOR);
- if (src.rows == 0 or src.cols == 0) {
- throw std::runtime_error("Both rows and cols are 0 for image");
- }
-@@ -606,13 +606,13 @@ bool VideoInputOp<Context>::GetImageAndLabelsFromDBValue(
- img = scaled_img;
- } else {
- cv::cvtColor(
-- scaled_img, img, (channels_rgb_ == 1) ? CV_BGR2GRAY : CV_GRAY2BGR);
-+ scaled_img, img, (channels_rgb_ == 1) ? cv::COLOR_BGR2GRAY : cv::COLOR_GRAY2BGR);
- }
-
- cv::Mat rgb_img;
-
- if (channels_rgb_ == 1) {
-- cv::cvtColor(img, rgb_img, CV_BGR2RGB);
-+ cv::cvtColor(img, rgb_img, cv::COLOR_BGR2RGB);
- } else {
- rgb_img = img;
- }
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-15 07:46:36 UTC (rev 516099)
+++ PKGBUILD 2019-10-15 07:46:37 UTC (rev 516100)
@@ -4,18 +4,17 @@
pkgbase="python-pytorch"
pkgname=("python-pytorch" "python-pytorch-opt" "python-pytorch-cuda" "python-pytorch-opt-cuda")
_pkgname="pytorch"
-pkgver=1.2.0
-pkgrel=3
+pkgver=1.3.0
+pkgrel=1
pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
arch=('x86_64')
url="https://pytorch.org"
license=('BSD')
depends=('google-glog' 'gflags' 'opencv' 'openmp' 'nccl' 'pybind11' 'python' 'python-yaml' 'python-numpy' 'protobuf' 'ffmpeg' 'python-future')
-makedepends=('python' 'python-setuptools' 'python-yaml' 'python-numpy' 'cmake' 'cuda' 'cudnn' 'git' 'magma')
-source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#tag=v$pkgver"
- 24143.patch)
-sha256sums=('SKIP'
- '773971a391e2d517630b37150ec20bd4ba06181c5c9767d51cd7358729b4aa5a')
+makedepends=('python' 'python-setuptools' 'python-yaml' 'python-numpy' 'cmake' 'cuda' 'cudnn' 'git' 'magma' 'qt5-base')
+optdepends=('qt5-base: HighGUI module')
+source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#tag=v$pkgver")
+sha256sums=('SKIP')
get_pyver () {
python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
@@ -24,8 +23,6 @@
prepare() {
cd "${_pkgname}-${pkgver}"
- patch -Np1 -i "$srcdir"/24143.patch
-
# This is the lazy way since pytorch has sooo many submodules and they keep
# changing them around but we've run into more problems so far doing it the
# manual than the lazy way. This lazy way (not explicitly specifying all
@@ -33,6 +30,9 @@
# It will result in the same package, don't worry.
git submodule update --init --recursive
+ # https://github.com/pytorch/pytorch/issues/26555
+ sed -i 's#^ ${CMAKE_CURRENT_SOURCE_DIR}/tensor_iterator_test.cpp##g' aten/src/ATen/test/CMakeLists.txt
+
cd ..
cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt"
More information about the arch-commits
mailing list