diff --git a/sci-ml/kineto/Manifest b/sci-ml/kineto/Manifest index b18d0acfc1448..96f8421804858 100644 --- a/sci-ml/kineto/Manifest +++ b/sci-ml/kineto/Manifest @@ -1,2 +1,3 @@ DIST kineto-0.4.0_p20250214.tar.gz 8276188 BLAKE2B 45a07fe6dbfb68dcba4c637851404fbea7e15642b97e30baf8dbce3a9b80a6e0662ce684027aa5a00da0ff86daf028e2ea173451857264e8a5f5800629bdc767 SHA512 614f7ec7e0bcbd816d01b704a85efadd6340a322ebf60920b72717c65034b1ea60cab65243833b651482465fc145211bed25de83592801e4b9e955839f404b20 DIST kineto-0.4.0_p20250617.tar.gz 8282683 BLAKE2B 91993fef72e04da98ba6443e164876ec475daf5fc3ce34851f2ae968fce00a3650278eac3cb96b940705c4a58aba3b296c0bc2cc9edc54f3a01891d473f07ee8 SHA512 921b96a56e01d69895b79e67582d8977ed6f873573ab41557c5d026ada5d1f6365e4ed0a0c6804057c52e92510749fc58619f554a164c1ba9d8cd13e789bebd0 +DIST kineto-0.4.0_p20251121.tar.gz 8306901 BLAKE2B a848743b7a41cd733008316f0fe74e6c2eeea5425fb70be9d84da261e542d1102cab45cda1aaa5a0bcc945de1dfc323719856082ff0c2d31ea3fa88036cfd91a SHA512 4c72747c17e10752d3a7113f2ae5bc049566849d2136a2b5a5916fb042842bea1186b5436ac52f0e829ad54965af7c5810c5a0199e6eb81a7c79bd977984b4f5 diff --git a/sci-ml/kineto/files/kineto-0.4.0_p20251121-gentoo.patch b/sci-ml/kineto/files/kineto-0.4.0_p20251121-gentoo.patch new file mode 100644 index 0000000000000..ed0710cf8d254 --- /dev/null +++ b/sci-ml/kineto/files/kineto-0.4.0_p20251121-gentoo.patch @@ -0,0 +1,30 @@ +--- a/CMakeLists.txt 2022-05-24 11:16:18.537610972 +0200 ++++ b/CMakeLists.txt 2022-05-24 11:19:15.011073535 +0200 +@@ -156,11 +156,10 @@ + set(ROCM_INCLUDE_DIRS "${ROCM_SOURCE_DIR}/include") + endif() + +-set(DYNOLOG_INCLUDE_DIR "${LIBKINETO_THIRDPARTY_DIR}/dynolog/") +-set(IPCFABRIC_INCLUDE_DIR "${DYNOLOG_INCLUDE_DIR}/dynolog/src/ipcfabric/") +-add_subdirectory("${IPCFABRIC_INCLUDE_DIR}") ++set(DYNOLOG_INCLUDE_DIR "@GENTOO_PORTAGE_EPREFIX@/usr/include/dynolog/") ++set(IPCFABRIC_INCLUDE_DIR "@GENTOO_PORTAGE_EPREFIX@/usr/include/dynolog/src/ipcfabric/") + +-if(NOT TARGET fmt::fmt-header-only) ++if(FALSE) + if(NOT FMT_SOURCE_DIR) + set(FMT_SOURCE_DIR "${LIBKINETO_THIRDPARTY_DIR}/fmt" + CACHE STRING "fmt source directory from submodules") +@@ -195,12 +194,10 @@ + if(DEFINED LIBKINETO_NOAIUPTI AND NOT LIBKINETO_NOAIUPTI) + target_include_directories(kineto_base PUBLIC ${AIU_INCLUDE_DIR}) + endif() +-target_link_libraries(kineto_base PRIVATE $) + + target_include_directories(kineto_api PUBLIC + $ + $) +-target_link_libraries(kineto_api PRIVATE $) + + if(KINETO_LIBRARY_TYPE STREQUAL "static") + set(BUILD_SHARED_LIBS OFF) diff --git a/sci-ml/kineto/kineto-0.4.0_p20251121.ebuild b/sci-ml/kineto/kineto-0.4.0_p20251121.ebuild new file mode 100644 index 0000000000000..fd4dc779d9424 --- /dev/null +++ b/sci-ml/kineto/kineto-0.4.0_p20251121.ebuild @@ -0,0 +1,51 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..14} ) +inherit python-any-r1 cmake prefix + +CommitId=31f85df8fbd89c188f14ef10f1ec65379786b943 + +DESCRIPTION="part of the PyTorch Profiler" +HOMEPAGE="https://github.com/pytorch/kineto" +SRC_URI="https://github.com/pytorch/${PN}/archive/${CommitId}.tar.gz + -> ${P}.tar.gz" +S="${WORKDIR}"/${PN}-${CommitId}/libkineto + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="test" + +RDEPEND=" + dev-libs/libfmt + dev-libs/dynolog +" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( dev-cpp/gtest ) + ${PYTHON_DEPS} +" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.4.0_p20250418-AppxClock.patch +) + +src_prepare() { + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DLIBKINETO_THIRDPARTY_DIR="${EPREFIX}"/usr/include/ + -DKINETO_BUILD_TESTS=OFF # tests require cuda toolkit + -DCUDA_SOURCE_DIR=/opt/cuda + -DLIBKINETO_NOXPUPTI=Yes + ) + eapply $(prefixify_ro "${FILESDIR}"/${P}-gentoo.patch) + + cmake_src_configure +}