commit:     6c6c2ae3911d1207de941a75ac3b5503bffa4276
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Fri Dec 19 14:04:25 2025 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sat Dec 20 15:42:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c6c2ae3

sci-ml/cudnn-frontend: add 1.15.0

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45104
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 sci-ml/cudnn-frontend/Manifest                     |   1 +
 sci-ml/cudnn-frontend/cudnn-frontend-1.15.0.ebuild | 107 +++++++++++++++++++++
 2 files changed, 108 insertions(+)

diff --git a/sci-ml/cudnn-frontend/Manifest b/sci-ml/cudnn-frontend/Manifest
index 4a744122f37d..ad1186117388 100644
--- a/sci-ml/cudnn-frontend/Manifest
+++ b/sci-ml/cudnn-frontend/Manifest
@@ -1,3 +1,4 @@
 DIST cudnn-frontend-1.10.0.tar.gz 662344 BLAKE2B 
f151a57afdf41c03829b67d9ecda0e78697b3cf8bd1d4fc460a0e1ece6f79ee4c8dcb9615f630f9fc0c8d44cd1f2de249ac260d6e1386d696fa09536e7e23258
 SHA512 
24df540fa3adb82d3632aa41f58e5c03da55d064f69e7f109668365995e189a4968c18881c6b4e9ed1a9bc3fa0347e9df01ae85aff2d7f330c0328ff56d27eab
 DIST cudnn-frontend-1.11.0.tar.gz 653191 BLAKE2B 
2f784424bb4c850683b8ecf0b24e03c761227f839d63ad92eba38b5d9a530800a32e7311f27c0bc9e31a0bfc26324acf4d194d143f69f1b6094a3958d2874ce0
 SHA512 
2d50fbedc1d2f488275aedce84893447a025d4c00b9e8609c4004b2eb0525480a348835d0e8b2784499d80d0c63d75bb1430741cb06c3652da8dd72b822489fa
 DIST cudnn-frontend-1.12.1.tar.gz 1683639 BLAKE2B 
1d00e0caea27fc63883b867fa192f1346c67318f4781b0255e0203753a7ead80746291736e6972c58aa8a1870ccac38ea4dbfe551e5da97596a857d53bc826ea
 SHA512 
02dba5b4480099d1e14abb2fc16d64466955988932bbfdabfe58104576582c644cacec07674baf23e51bb3d8311e5b7080b1e3b3c140d9f463767c2f117e750e
+DIST cudnn-frontend-1.15.0.tar.gz 1945364 BLAKE2B 
0881cef7635d32145d396fd7476c781acf0d6913ff0704552adbb087276cc36d32d53f56a8d1975f7c8b04bf6d5df5e3bbcfbf0ed7dd8d21e6e082a5e0b1bceb
 SHA512 
75943654652bbde8dc90cf52b58078a8c8250940827cebfe96c36750bc41047d016a94f1201f9e4069cdac56e0804c2f5a534ca86d4dc0f0ba4e65a97792a7a7

diff --git a/sci-ml/cudnn-frontend/cudnn-frontend-1.15.0.ebuild 
b/sci-ml/cudnn-frontend/cudnn-frontend-1.15.0.ebuild
new file mode 100644
index 000000000000..2be111a564d9
--- /dev/null
+++ b/sci-ml/cudnn-frontend/cudnn-frontend-1.15.0.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cuda cmake edo
+
+DESCRIPTION="A c++ wrapper for the cudnn backend API"
+HOMEPAGE="https://github.com/NVIDIA/cudnn-frontend";
+
+SRC_URI="https://github.com/NVIDIA/cudnn-frontend/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+IUSE="samples test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       >=dev-libs/cudnn-9.0.0:=
+"
+DEPEND="${RDEPEND}
+       dev-cpp/nlohmann_json
+       test? (
+               >=dev-cpp/catch-3
+               >=dev-libs/cudnn-9.14.0
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-1.11.0-fix.patch"
+)
+
+src_prepare() {
+       cmake_src_prepare
+
+       sed -e 
's#"cudnn_frontend/thirdparty/nlohmann/json.hpp"#<nlohmann/json.hpp>#' \
+               -i include/cudnn_frontend_utils.h || die
+
+       rm -r include/cudnn_frontend/thirdparty || die
+}
+
+src_configure() {
+       local narch
+       if use amd64; then
+               narch="x86_64"
+       elif use arm64; then
+               narch="sbsa"
+       fi
+
+       local mycmakeargs=(
+               -DCUDNN_FRONTEND_BUILD_PYTHON_BINDINGS="no"
+               -DCUDNN_FRONTEND_BUILD_SAMPLES="$(usex test "$(usex samples)")"
+               -DCUDNN_FRONTEND_BUILD_TESTS="$(usex test)"
+               -DCUDNN_FRONTEND_SKIP_JSON_LIB="no"
+       )
+
+       if use samples || use test; then
+               # allow slotted install
+               : "${CUDNN_PATH:=${ESYSROOT}/opt/cuda}"
+               export CUDNN_PATH
+       fi
+
+       cmake_src_configure
+}
+
+src_test() {
+       cuda_add_sandbox -w
+       addwrite "/proc/self/task"
+
+       # List all tests
+       # "${BUILD_DIR}/bin/tests" --list-tests --verbosity quiet
+
+       local catchargs=()
+
+       local CATCH_SKIP_TESTS=()
+
+       if [[ -v CUDAARCHS && "${CUDAARCHS}" != 89 ]]; then
+               CATCH_SKIP_TESTS+=(
+                        # doesn't work on 86 52
+                       'Graph key'
+                       'Graph key dynamic shape'
+
+                        # doesn't work on 86
+                       'sdpa backward graph serialization'
+               )
+       fi
+
+       [[ -v CATCH_SKIP_TESTS ]] && catchargs+=( "${CATCH_SKIP_TESTS[@]/#/\~}" 
)
+
+       edo "${BUILD_DIR}/bin/tests" -s "${catchargs[@]}"
+
+       if use samples; then
+               edo "${BUILD_DIR}/bin/samples" -s
+               edo "${BUILD_DIR}/bin/legacy_samples" -s
+       fi
+
+       cmake_src_test
+}
+
+src_install() {
+       cmake_src_install
+
+       if use test; then
+               rm -R "${ED}/usr/bin/tests" || die
+       fi
+}

Reply via email to