commit:     563fdaf1e3ae2e7362a3ef6f4cfafa84c4706403
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun May  4 19:05:35 2025 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun May  4 19:23:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=563fdaf1

sci-ml/caffe2: enable kineto

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 sci-ml/caffe2/caffe2-2.7.0.ebuild                      |  4 ++--
 sci-ml/caffe2/files/caffe2-2.5.1-unbundle_kineto.patch | 11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/sci-ml/caffe2/caffe2-2.7.0.ebuild 
b/sci-ml/caffe2/caffe2-2.7.0.ebuild
index 1a954381cc6d..1ee026bcf176 100644
--- a/sci-ml/caffe2/caffe2-2.7.0.ebuild
+++ b/sci-ml/caffe2/caffe2-2.7.0.ebuild
@@ -105,7 +105,7 @@ DEPEND="
        dev-libs/pocketfft
        dev-libs/psimd
        sci-ml/FP16
-       sci-ml/kineto
+       ~sci-ml/kineto-0.4.0_p20250214
        $(python_gen_cond_dep '
                dev-python/pybind11[${PYTHON_USEDEP}]
                dev-python/pyyaml[${PYTHON_USEDEP}]
@@ -232,7 +232,7 @@ src_configure() {
                -DUSE_GLOG=ON
                -DUSE_GLOO=$(usex gloo)
                -DUSE_ITT=OFF
-               -DUSE_KINETO=OFF # TODO
+               -DUSE_KINETO=ON # TODO
                -DUSE_KLEIDIAI=OFF # TODO
                -DUSE_MAGMA=OFF # TODO: In GURU as sci-libs/magma
                -DUSE_MEM_EFF_ATTENTION=$(usex memefficient)

diff --git a/sci-ml/caffe2/files/caffe2-2.5.1-unbundle_kineto.patch 
b/sci-ml/caffe2/files/caffe2-2.5.1-unbundle_kineto.patch
index ebe931bc49b6..0ef6cd6d01ce 100644
--- a/sci-ml/caffe2/files/caffe2-2.5.1-unbundle_kineto.patch
+++ b/sci-ml/caffe2/files/caffe2-2.5.1-unbundle_kineto.patch
@@ -20,3 +20,14 @@
  
  if(USE_KINETO)
    target_include_directories(torch_cpu PRIVATE
+--- a/cmake/Dependencies.cmake 2025-05-04 15:30:00.268862558 +0200
++++ b/cmake/Dependencies.cmake 2025-05-04 15:30:13.275934233 +0200
+@@ -1711,7 +1711,7 @@
+     endif()
+   endif()
+ 
+-  if(NOT TARGET kineto)
++  if(FALSE)
+     add_subdirectory("${KINETO_SOURCE_DIR}")
+     set_property(TARGET kineto PROPERTY POSITION_INDEPENDENT_CODE ON)
+   endif()

Reply via email to