commit: 55fa1c58171e27c220321cc8fe3ad2af33da488e Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com> AuthorDate: Fri Dec 26 00:55:17 2025 +0000 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> CommitDate: Fri Dec 26 12:46:15 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55fa1c58
sci-ml/oneDNN: add 3.10.2 oneDNN is as usual backwards compatible and no pinning needed for reverse dependencies. All tests passed now (including those that weree skipped due to sandbox stack overflow). Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45163 Closes: https://github.com/gentoo/gentoo/pull/45163 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> sci-ml/oneDNN/Manifest | 1 + sci-ml/oneDNN/oneDNN-3.10.2.ebuild | 123 +++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) diff --git a/sci-ml/oneDNN/Manifest b/sci-ml/oneDNN/Manifest index b562c18060d0..6b959506a2ea 100644 --- a/sci-ml/oneDNN/Manifest +++ b/sci-ml/oneDNN/Manifest @@ -1,3 +1,4 @@ +DIST oneDNN-3.10.2.tar.gz 13511649 BLAKE2B 99888f0dee55cad4ce2968ad3ebeacc47c45174d5dc263c1d7a4fc060ef015fa027cf09a49f530087f8faaf9200928bf7089d11b003eaf8d861205852a749f14 SHA512 8075fbd3a93c3b070eb2d69e5e52456bfdf14eda9d3c3ed6be5a4b806ea51f0a7974f206ad6a53e62387718b875893d94d9dbd414908f442d5ecc388a458f851 DIST oneDNN-3.5.3.tar.gz 13190748 BLAKE2B 04ad0a6c6edeb1d356397bcd25cb77aaa2be00ea8eed343cd088e400b10fb3d7f7658ed35797f16dbe8434fb9a2bf2c715def7a8e749271ea2c911957f9e98fc SHA512 251da59164c102a6dd3c97e92aef58a879930c0def6e9fe6e43e68e1316ed0c9844796e69eecebbde12085900bfcda6c1ab30db6df24ba9826883171c87a964d DIST oneDNN-3.6.2.tar.gz 13788211 BLAKE2B bc6039d24b33ac5a3f362d161b7dddbeb3f6b2b865175a1eecf66bb199d641d017b4036f7cfa18740302c96d06b2ed8d210de922136924edc309434731b16f36 SHA512 b45b6ae398ac33fdb79415395865bc34e0af35995015154df82a434bf5dc7a6ae126fb52cefc264b6abab04b2da5d60f6325f47052fa9430650c77dd54e612f6 DIST oneDNN-3.7.1.tar.gz 14097902 BLAKE2B 0f6359e8ed00f5c58bd588576a549f4c88eb18b8734454c8435fb7a9a678abdaa17bc7fcb74a19384f6b4a63489d0464a0f97546c516b0b1f3b6d39557554432 SHA512 f7c4fea4ea16058e3197b756a2c879346698ee1189572ff0eec28e88ad3edb539c5dfcca18c36941de762b25e64f4610a40c391287294affe24ec18f3ebb4060 diff --git a/sci-ml/oneDNN/oneDNN-3.10.2.ebuild b/sci-ml/oneDNN/oneDNN-3.10.2.ebuild new file mode 100644 index 000000000000..00f762b2b2a5 --- /dev/null +++ b/sci-ml/oneDNN/oneDNN-3.10.2.ebuild @@ -0,0 +1,123 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DIR="${WORKDIR}/${P}_build" + +# oneDNN has its own FindBLAS.cmake file to find MKL (in a non-standard way). +# Removing of CMake modules is disabled. +CMAKE_REMOVE_MODULES_LIST=( none ) + +# There is additional sphinx documentation but we are missing dependency doxyrest. +inherit cmake docs multiprocessing toolchain-funcs + +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 mkl cblas static-libs +openmp" + +RESTRICT="test" # Some test are very long to execute + +DEPEND=" + mkl? ( sci-libs/mkl ) + cblas? ( !mkl? ( virtual/cblas ) ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + openmp? ( + || ( + sys-devel/gcc[openmp] + llvm-runtimes/clang-runtime[openmp] + ) + ) +" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_configure() { + if ! use openmp ; then + ewarn "WARNING: oneDNN is being built with sequential runtime." + ewarn "Proceeding might lead to highly sub-optimal performance." + ewarn "Conside enabling \"openmp\" USE flag." + fi + + local mycmakeargs=( + -DONEDNN_LIBRARY_TYPE=$(usex static-libs STATIC SHARED) + -DONEDNN_CPU_RUNTIME=$(usex openmp OMP SEQ) + -DONEDNN_GPU_RUNTIME=NONE + -DONEDNN_BUILD_EXAMPLES=OFF + -DONEDNN_BUILD_TESTS="$(usex test)" + -DONEDNN_ENABLE_CONCURRENT_EXEC=OFF + -DONEDNN_ENABLE_JIT_PROFILING=ON + -DONEDNN_ENABLE_ITT_TASKS=ON + -DONEDNN_ENABLE_PRIMITIVE_CACHE=ON + -DONEDNN_ENABLE_MAX_CPU_ISA=ON + -DONEDNN_ENABLE_CPU_ISA_HINTS=ON + -DONEDNN_ENABLE_WORKLOAD=TRAINING + -DONEDNN_ENABLE_PRIMITIVE=ALL + -DONEDNN_ENABLE_PRIMITIVE_GPU_ISA=ALL + -DONEDNN_EXPERIMENTAL=OFF + -DONEDNN_VERBOSE=ON + -DONEDNN_DEV_MODE=OFF + -DONEDNN_AARCH64_USE_ACL=OFF + -DONEDNN_EXPERIMENTAL_UKERNEL=ON + -DONEDNN_GPU_VENDOR=INTEL + -DONEDNN_LIBRARY_NAME=dnnl + -DONEDNN_BUILD_GRAPH=ON + -DONEDNN_ENABLE_GRAPH_DUMP=OFF + -DONEDNN_ENABLE_PRIMITIVE_CPU_ISA=ALL + -DONEDNN_ENABLE_GEMM_KERNELS_ISA=ALL + ) + + if use mkl ; then + if [ -e "${EPREFIX}"/opt/intel/oneapi/mkl/latest/env/vars.sh ]; then + source "${EPREFIX}"/opt/intel/oneapi/mkl/latest/env/vars.sh || die + else + # bug 923109: sci-libs/mkl-2020.4.304 has no vars.sh, configure it manually + export CPATH="${EPREFIX}"/usr/include/mkl + export MKLROOT="${EPREFIX}"/usr + fi + + mycmakeargs+=( -DONEDNN_BLAS_VENDOR=MKL ) + elif use cblas; then + mycmakeargs+=( -DONEDNN_BLAS_VENDOR=ANY -DBLA_VENDOR=Generic -DBLAS_LIBRARIES=-lcblas ) + else + mycmakeargs+=( -DONEDNN_BLAS_VENDOR=NONE ) + fi + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + docs_compile +} + +src_test() { + if use openmp ; then + # Don't run tests in parallel, each test is already parallelized + OMP_NUM_THREADS=$(makeopts_jobs) cmake_src_test -j1 + else + cmake_src_test + fi +} + +src_install() { + cmake_src_install + + # Correct docdir + mv "${ED}/usr/share/doc/dnnl"* "${ED}/usr/share/doc/${PF}" || die +}
