diff options
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/oneDNN/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/oneDNN/metadata.xml | 11 | ||||
-rw-r--r-- | dev-libs/oneDNN/oneDNN-2.7.2.ebuild | 60 |
3 files changed, 72 insertions, 0 deletions
diff --git a/dev-libs/oneDNN/Manifest b/dev-libs/oneDNN/Manifest new file mode 100644 index 000000000..3f702434b --- /dev/null +++ b/dev-libs/oneDNN/Manifest @@ -0,0 +1 @@ +DIST oneDNN-2.7.2.tar.gz 6409290 BLAKE2B 8e6fb262a77469cfaddd633bf11334d04ffb641fa798f0de23e458086c66c9b7e932d45d52baf8a93453495df9280f6a97dc3f220d7674850d1ca6c525ce2a7f SHA512 faf8ea953f552afaafcc597f647a98187c8c6dabd8a532fc1b8037626fa77a8a6543dce3247d953a470391d39189ba421ab7de589a8bb7c4c38e22327ab1c401 diff --git a/dev-libs/oneDNN/metadata.xml b/dev-libs/oneDNN/metadata.xml new file mode 100644 index 000000000..0d6dc84a7 --- /dev/null +++ b/dev-libs/oneDNN/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <upstream> + <remote-id type="github">oneapi-src/oneDNN</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-libs/oneDNN/oneDNN-2.7.2.ebuild b/dev-libs/oneDNN/oneDNN-2.7.2.ebuild new file mode 100644 index 000000000..1c66ec72c --- /dev/null +++ b/dev-libs/oneDNN/oneDNN-2.7.2.ebuild @@ -0,0 +1,60 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DIR="${WORKDIR}/${P}_build" +# There is additional sphinx documentation but we are missing dependency doxyrest. +inherit cmake docs + +DESCRIPTION="oneAPI Deep Neural Network Library" +HOMEPAGE="https://github.com/oneapi-src/oneDNN" +SRC_URI="https://github.com/oneapi-src/oneDNN/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="test" +# TODO: get the tests up and running +#RESTRICT="!test? ( test )" +RESTRICT="test" + +BDEPEND="sys-devel/DPC++" + +DEPEND=" + dev-cpp/tbb:= + dev-libs/level-zero:= + virtual/opencl +" +RDEPEND="${DEPEND}" + +src_prepare() { + # DPC++ compiler required for full functionality + export CC="${ESYSROOT}/usr/lib/llvm/intel/bin/clang" + export CXX="${ESYSROOT}/usr/lib/llvm/intel/bin/clang++" + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DDNNL_CPU_RUNTIME=DPCPP + -DDNNL_GPU_RUNTIME=DPCPP + -DDNNL_BUILD_TESTS="$(usex test)" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + docs_compile +} + +src_install() { + cmake_src_install + # Correct docdir + mv "${ED}/usr/share/doc/dnnl/"* "${ED}/usr/share/doc/${PF}" || die + rm -r "${ED}/usr/share/doc/dnnl" || die +} |