Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/caffe2/
Date: Wed, 30 Nov 2022 18:20:14
Message-Id: 1669832395.3625a2f15847ca2daefbbb7c267840701886507b.tupone@gentoo
1 commit: 3625a2f15847ca2daefbbb7c267840701886507b
2 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 30 18:19:55 2022 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 30 18:19:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3625a2f1
7
8 sci-libs/caffe2: drop 1.11.0-r2
9
10 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
11
12 sci-libs/caffe2/Manifest | 1 -
13 sci-libs/caffe2/caffe2-1.11.0-r2.ebuild | 160 --------------------------------
14 2 files changed, 161 deletions(-)
15
16 diff --git a/sci-libs/caffe2/Manifest b/sci-libs/caffe2/Manifest
17 index 0d28654e641f..013309cd70ce 100644
18 --- a/sci-libs/caffe2/Manifest
19 +++ b/sci-libs/caffe2/Manifest
20 @@ -1,2 +1 @@
21 -DIST pytorch-1.11.0.tar.gz 20719323 BLAKE2B 24e7aaa2c26821d36f8092542de9d8d5ac85a619fb9fffb5131987958842afb1cad395780662d15f3411a7cc6ff83a445871960eca1e469fcbf0b9895d83d6e0 SHA512 2342eb7a1a241f5855a7cf12e11f62bc4baaa78d1d0864e53bfc946e783eb4addd05ca154a814d2376cd602098b5547e61c158d6eddb7cad5a9f3b0c1357adca
22 DIST pytorch-1.12.0.tar.gz 106286765 BLAKE2B ff9bafedb35f859f7dccb9b606299cf9c345bdaa0deb87ecfe0c0c30c3c828414d989e1d9a243d9b7cd3f376d56a2f81c241ca2e3c9a8a2b30cddcdeddd3a5c7 SHA512 c9c748a2e0047daaaf199a1ba3198d2d1aee47f664170a9b34ccacd3deeb95f2070e4035eeb900012ef48dc62cf6fb6806f1a1dfe22de8c94892963076e593b7
23
24 diff --git a/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild b/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild
25 deleted file mode 100644
26 index d5d2250da0f5..000000000000
27 --- a/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild
28 +++ /dev/null
29 @@ -1,160 +0,0 @@
30 -# Copyright 2022 Gentoo Authors
31 -# Distributed under the terms of the GNU General Public License v2
32 -
33 -EAPI=8
34 -
35 -PYTHON_COMPAT=( python3_{8..10} )
36 -inherit python-r1 cmake
37 -
38 -MYPN=pytorch
39 -MYP=${MYPN}-${PV}
40 -
41 -DESCRIPTION="A deep learning framework"
42 -HOMEPAGE="https://pytorch.org/"
43 -SRC_URI="https://github.com/pytorch/${MYPN}/archive/refs/tags/v${PV}.tar.gz
44 - -> ${MYP}.tar.gz"
45 -
46 -LICENSE="BSD"
47 -SLOT="0"
48 -KEYWORDS="~amd64"
49 -IUSE="cuda ffmpeg nnpack +numpy opencl opencv openmp qnnpack xnnpack"
50 -RESTRICT="test"
51 -REQUIRED_USE="
52 - ${PYTHON_REQUIRED_USE}
53 - ffmpeg? ( opencv )
54 -" # ?? ( cuda rocm )
55 -
56 -RDEPEND="
57 - ${PYTHON_DEPS}
58 - dev-cpp/gflags:=
59 - <dev-cpp/glog-0.5.0
60 - dev-libs/cpuinfo
61 - dev-libs/libfmt
62 - dev-libs/protobuf
63 - dev-libs/pthreadpool
64 - dev-libs/sleef
65 - sci-libs/lapack
66 - sci-libs/onnx
67 - sci-libs/foxi
68 - cuda? (
69 - =dev-libs/cudnn-8*
70 - dev-libs/cudnn-frontend:0/8
71 - dev-util/nvidia-cuda-toolkit:=[profiler]
72 - )
73 - ffmpeg? ( media-video/ffmpeg:= )
74 - nnpack? ( sci-libs/NNPACK )
75 - numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
76 - opencl? ( virtual/opencl )
77 - opencv? ( media-libs/opencv:= )
78 - qnnpack? ( sci-libs/QNNPACK )
79 - xnnpack? ( sci-libs/XNNPACK )
80 -"
81 -DEPEND="
82 - ${RDEPEND}
83 - dev-cpp/eigen
84 - dev-libs/psimd
85 - dev-libs/FP16
86 - dev-libs/FXdiv
87 - dev-libs/pocketfft
88 - dev-libs/flatbuffers
89 - dev-python/pyyaml[${PYTHON_USEDEP}]
90 - dev-python/pybind11[${PYTHON_USEDEP}]
91 -"
92 -
93 -S="${WORKDIR}"/${MYP}
94 -
95 -PATCHES=(
96 - "${FILESDIR}"/${PN}-1.11.0-gentoo.patch
97 - "${FILESDIR}"/${PN}-1.12.0-install-dirs.patch
98 -)
99 -
100 -src_prepare() {
101 - cmake_src_prepare
102 - pushd torch/csrc/jit/serialization || die
103 - flatc --cpp --gen-mutable --scoped-enums mobile_bytecode.fbs || die
104 - popd
105 -}
106 -
107 -src_configure() {
108 - if use cuda && [[ -z ${TORCH_CUDA_ARCH_LIST} ]]; then
109 - ewarn "WARNING: caffe2 is being built with its default CUDA compute capabilities: 3.5 and 7.0."
110 - ewarn "These may not be optimal for your GPU."
111 - ewarn ""
112 - ewarn "To configure caffe2 with the CUDA compute capability that is optimal for your GPU,"
113 - ewarn "set TORCH_CUDA_ARCH_LIST in your make.conf, and re-emerge caffe2."
114 - ewarn "For example, to use CUDA capability 7.5 & 3.5, add: TORCH_CUDA_ARCH_LIST=7.5,3.5"
115 - ewarn "For a Maxwell model GPU, an example value would be: TORCH_CUDA_ARCH_LIST=Maxwell"
116 - ewarn ""
117 - ewarn "You can look up your GPU's CUDA compute capability at https://developer.nvidia.com/cuda-gpus"
118 - ewarn "or by running /opt/cuda/extras/demo_suite/deviceQuery | grep 'CUDA Capability'"
119 - fi
120 -
121 - python_setup
122 - local mycmakeargs=(
123 - -DBUILD_CUSTOM_PROTOBUF=OFF
124 - -DBUILD_SHARED_LIBS=ON
125 -
126 - -DUSE_CCACHE=OFF
127 - -DUSE_CUDA=$(usex cuda)
128 - -DUSE_CUDNN=$(usex cuda)
129 - -DUSE_FAST_NVCC=$(usex cuda)
130 - -DTORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-3.5 7.0}"
131 - -DUSE_DISTRIBUTED=OFF
132 - -DUSE_FAKELOWP=OFF
133 - -DUSE_FBGEMM=OFF # TODO
134 - -DUSE_FFMPEG=$(usex ffmpeg)
135 - -DUSE_GFLAGS=ON
136 - -DUSE_GLOG=ON
137 - -DUSE_GLOO=OFF
138 - -DUSE_KINETO=OFF # TODO
139 - -DUSE_LEVELDB=OFF
140 - -DUSE_MAGMA=OFF # TODO: In GURU as sci-libs/magma
141 - -DUSE_MKLDNN=OFF
142 - -DUSE_NCCL=OFF # TODO: NVIDIA Collective Communication Library
143 - -DUSE_NNPACK=$(usex nnpack)
144 - -DUSE_QNNPACK=$(usex qnnpack)
145 - -DUSE_XNNPACK=$(usex xnnpack)
146 - -DUSE_SYSTEM_XNNPACK=$(usex xnnpack)
147 - -DUSE_PYTORCH_QNNPACK=OFF
148 - -DUSE_NUMPY=$(usex numpy)
149 - -DUSE_OPENCL=$(usex opencl)
150 - -DUSE_OPENCV=$(usex opencv)
151 - -DUSE_OPENMP=$(usex openmp)
152 - -DUSE_ROCM=OFF # TODO
153 - -DUSE_SYSTEM_CPUINFO=ON
154 - -DUSE_BREAKPAD=OFF # TODO
155 - -DUSE_SYSTEM_BIND11=ON
156 - -DPYBIND11_PYTHON_VERSION="${EPYTHON#python}"
157 - -DPYTHON_EXECUTABLE="${PYTHON}"
158 - -DUSE_SYSTEM_EIGEN_INSTALL=ON
159 - -DUSE_SYSTEM_PTHREADPOOL=ON
160 - -DUSE_SYSTEM_FXDIV=ON
161 - -DUSE_SYSTEM_FP16=ON
162 - -DUSE_SYSTEM_ONNX=ON
163 - -DUSE_SYSTEM_SLEEF=ON
164 - -DUSE_TENSORPIPE=OFF
165 -
166 - -Wno-dev
167 - -DTORCH_INSTALL_LIB_DIR="${EPREFIX}"/usr/$(get_libdir)
168 - -DLIBSHM_INSTALL_LIB_SUBDIR="${EPREFIX}"/usr/$(get_libdir)
169 - )
170 - cmake_src_configure
171 -}
172 -
173 -python_install() {
174 - python_domodule python/caffe2
175 - python_domodule python/torch
176 -}
177 -
178 -src_install() {
179 - cmake_src_install
180 -
181 - insinto "/var/lib/${PN}"
182 - doins "${BUILD_DIR}"/CMakeCache.txt
183 -
184 - rm -rf python
185 - mkdir -p python/torch || die
186 - mv "${ED}"/usr/lib/python*/site-packages/caffe2 python/ || die
187 - cp torch/version.py python/torch/ || die
188 - python_foreach_impl python_install
189 -}