diff options
author | Sv. Lockal <lockalsash@gmail.com> | 2024-01-08 21:09:04 +0000 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2024-01-09 08:15:31 +0100 |
commit | 6726d34ce3203d8f0e693ef749836a527929d52b (patch) | |
tree | 6f446ff0de2a8ea6af4c9209a869469f88563da4 /sci-libs/caffe2 | |
parent | dev-libs/oneDNN: new package, add 3.3.3 (diff) | |
download | gentoo-6726d34ce3203d8f0e693ef749836a527929d52b.tar.gz gentoo-6726d34ce3203d8f0e693ef749836a527929d52b.tar.bz2 gentoo-6726d34ce3203d8f0e693ef749836a527929d52b.zip |
sci-libs/caffe2: add support of onednn
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34714
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs/caffe2')
-rw-r--r-- | sci-libs/caffe2/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/caffe2/caffe2-2.1.2-r2.ebuild (renamed from sci-libs/caffe2/caffe2-2.1.2-r1.ebuild) | 33 | ||||
-rw-r--r-- | sci-libs/caffe2/metadata.xml | 1 |
3 files changed, 21 insertions, 14 deletions
diff --git a/sci-libs/caffe2/Manifest b/sci-libs/caffe2/Manifest index a05e285f98e0..55f23c0f7c92 100644 --- a/sci-libs/caffe2/Manifest +++ b/sci-libs/caffe2/Manifest @@ -1,3 +1,4 @@ +DIST ideep-6f4d653802bd43bc4eda515460df9f90353dbebe.tar.gz 57109 BLAKE2B 698ccc197e27a4812fc9df8d6821f8544e0528d9f925af97b7acf558cd91a5fa6ecb66012dda07e58d18d42c0aebb3f00baf5f947f01c851d6ecb2d9823eca0c SHA512 5310f15d7dfd45fc166d6b14a95ec35aa9b8e5fc3f5a5c5d2ab11666bce45ca5f23087780dccdcc60459d55e3b58fa13e3ea45bc0a51f890c0603660213e97f1 DIST pytorch-1.13.1.tar.gz 108279745 BLAKE2B 75de03b74dfdaf8d8fb5ea743fcc0c1b0e408a714ad4160c487921220a7b1755e5fa6e587e6bbc8c9f34dd75e096d2e6dd69c80d24821835fff6c833314434d3 SHA512 f16f89d027efade11d057245cad5b69a390e88b458398310ae30de2dbff7c8fd7f1165be7b8da7ea989c81ac3f5a66c5cb9050610e441a97c83fb8aa28c0bd62 DIST pytorch-2.0.1.tar.gz 111335778 BLAKE2B 7a10cc2b2d5e2422aef7e060a0c3a62ca5c7460c6e0b9becade9b98939501975c74ed5a175a653731f43ca824d2c9bd31f41d1f633c2b139779ab23d5331e9ce SHA512 2309a22b3be3ccdb36d8d9781a59a7bdcc2fdb8d95ada205702ec77862480f0cbb12cd5d6b8cd3114d01a6e33b7743d0fe9de93debf37138ca5c14403cdb0c43 DIST pytorch-2.1.2.tar.gz 116316469 BLAKE2B c5a55ee264bc3477d3556ba6376b5591117e992e56e0dd0c9ba93d12526e2727f7840f6f1e0730a38223b6492c9556840c4ebf22ffd220e97225c2abff303747 SHA512 a8961d78ad785b13c959a0612563a60e0de17a7c8bb9822ddea9a24072796354d07e81c47b6cc8761b21a6448845b088cf80e1661d9e889b0ed5474d3dc76756 diff --git a/sci-libs/caffe2/caffe2-2.1.2-r1.ebuild b/sci-libs/caffe2/caffe2-2.1.2-r2.ebuild index 56ae2472b0fb..35989b1e2e70 100644 --- a/sci-libs/caffe2/caffe2-2.1.2-r1.ebuild +++ b/sci-libs/caffe2/caffe2-2.1.2-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2023 Gentoo Authors +# Copyright 2022-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,16 +8,18 @@ inherit python-single-r1 cmake cuda flag-o-matic prefix MYPN=pytorch MYP=${MYPN}-${PV} +IDEEP_VERSION="6f4d653802bd43bc4eda515460df9f90353dbebe" DESCRIPTION="A deep learning framework" HOMEPAGE="https://pytorch.org/" -SRC_URI="https://github.com/pytorch/${MYPN}/archive/refs/tags/v${PV}.tar.gz - -> ${MYP}.tar.gz" +SRC_URI="https://github.com/pytorch/${MYPN}/archive/refs/tags/v${PV}.tar.gz -> ${MYP}.tar.gz +onednn? ( https://github.com/intel/ideep/archive/${IDEEP_VERSION}.tar.gz -> ideep-${IDEEP_VERSION}.tar.gz ) +" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64" -IUSE="cuda distributed fbgemm ffmpeg gloo mkl mpi nnpack +numpy opencl opencv openmp qnnpack tensorpipe xnnpack" +IUSE="cuda distributed fbgemm ffmpeg gloo mkl mpi nnpack +numpy onednn opencl opencv openmp qnnpack tensorpipe xnnpack" RESTRICT="test" REQUIRED_USE=" ${PYTHON_REQUIRED_USE} @@ -55,6 +57,7 @@ RDEPEND=" numpy? ( $(python_gen_cond_dep ' dev-python/numpy[${PYTHON_USEDEP}] ') ) + onednn? ( dev-libs/oneDNN ) opencl? ( virtual/opencl ) opencv? ( media-libs/opencv:= ) qnnpack? ( sci-libs/QNNPACK ) @@ -151,12 +154,11 @@ src_configure() { -DUSE_KINETO=OFF # TODO -DUSE_LEVELDB=OFF -DUSE_MAGMA=OFF # TODO: In GURU as sci-libs/magma - -DUSE_MKLDNN=OFF + -DUSE_MKLDNN=$(usex onednn) -DUSE_NCCL=OFF # TODO: NVIDIA Collective Communication Library -DUSE_NNPACK=$(usex nnpack) -DUSE_QNNPACK=$(usex qnnpack) -DUSE_XNNPACK=$(usex xnnpack) - -DUSE_SYSTEM_XNNPACK=$(usex xnnpack) -DUSE_TENSORPIPE=$(usex tensorpipe) -DUSE_PYTORCH_QNNPACK=OFF -DUSE_NUMPY=$(usex numpy) @@ -164,19 +166,12 @@ src_configure() { -DUSE_OPENCV=$(usex opencv) -DUSE_OPENMP=$(usex openmp) -DUSE_ROCM=OFF # TODO - -DUSE_SYSTEM_CPUINFO=ON - -DUSE_SYSTEM_PYBIND11=ON -DUSE_UCC=OFF -DUSE_VALGRIND=OFF -DPYBIND11_PYTHON_VERSION="${EPYTHON#python}" -DPYTHON_EXECUTABLE="${PYTHON}" -DUSE_ITT=OFF - -DUSE_SYSTEM_PTHREADPOOL=ON - -DUSE_SYSTEM_FXDIV=ON - -DUSE_SYSTEM_FP16=ON - -DUSE_SYSTEM_GLOO=ON - -DUSE_SYSTEM_ONNX=ON - -DUSE_SYSTEM_SLEEF=ON + -DUSE_SYSTEM_LIBS=ON -DUSE_METAL=OFF -Wno-dev @@ -198,6 +193,16 @@ src_configure() { -DCMAKE_CUDA_FLAGS="$(cuda_gccdir -f | tr -d \")" ) fi + + if use onednn; then + mycmakeargs+=( + -DUSE_MKLDNN=ON + -DMKLDNN_FOUND=ON + -DMKLDNN_LIBRARIES=dnnl + -DMKLDNN_INCLUDE_DIR="${ESYSROOT}/usr/include/oneapi/dnnl;${WORKDIR}/ideep-${IDEEP_VERSION}/include" + ) + fi + cmake_src_configure } diff --git a/sci-libs/caffe2/metadata.xml b/sci-libs/caffe2/metadata.xml index eac4c942a88d..e69bb62ba592 100644 --- a/sci-libs/caffe2/metadata.xml +++ b/sci-libs/caffe2/metadata.xml @@ -16,6 +16,7 @@ <flag name="gloo">Use sci-libs/gloo</flag> <flag name="nnpack">Use NNPACK</flag> <flag name="numpy">Add support for math operations through numpy</flag> + <flag name="onednn">Use oneDNN</flag> <flag name="opencv">Add support for image processing operators</flag> <flag name="openmp">Use OpenMP for parallel code</flag> <flag name="qnnpack">Use QNNPACK</flag> |