commit:     27e4c06d52a66978ec41a325468bdd3b756236ba
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu May  9 18:44:58 2024 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu May  9 18:45:45 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27e4c06d

sci-libs/caffe2: filtering FLASH ATTENTION by USE flash

Bug: https://bugs.gentoo.org/931046
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 .../caffe2/{caffe2-2.3.0-r2.ebuild => caffe2-2.3.0-r3.ebuild}     | 8 ++++++--
 sci-libs/caffe2/metadata.xml                                      | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/sci-libs/caffe2/caffe2-2.3.0-r2.ebuild 
b/sci-libs/caffe2/caffe2-2.3.0-r3.ebuild
similarity index 97%
rename from sci-libs/caffe2/caffe2-2.3.0-r2.ebuild
rename to sci-libs/caffe2/caffe2-2.3.0-r3.ebuild
index 41630a00aa19..c01e904d8eb0 100644
--- a/sci-libs/caffe2/caffe2-2.3.0-r2.ebuild
+++ b/sci-libs/caffe2/caffe2-2.3.0-r3.ebuild
@@ -20,7 +20,7 @@ S="${WORKDIR}"/${MYP}
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="cuda distributed fbgemm ffmpeg gloo mkl mpi nnpack +numpy onednn 
openblas opencl opencv openmp qnnpack rocm xnnpack"
+IUSE="cuda distributed fbgemm ffmpeg flash gloo mkl mpi nnpack +numpy onednn 
openblas opencl opencv openmp qnnpack rocm xnnpack"
 RESTRICT="test"
 REQUIRED_USE="
        ${PYTHON_REQUIRED_USE}
@@ -28,7 +28,10 @@ REQUIRED_USE="
        mpi? ( distributed )
        gloo? ( distributed )
        ?? ( cuda rocm )
-       rocm? ( || ( ${ROCM_REQUIRED_USE} ) )
+       rocm? (
+               || ( ${ROCM_REQUIRED_USE} )
+               !flash
+       )
 "
 
 # CUDA 12 not supported yet: https://github.com/pytorch/pytorch/issues/91122
@@ -172,6 +175,7 @@ src_configure() {
                -DUSE_FAKELOWP=OFF
                -DUSE_FBGEMM=$(usex fbgemm)
                -DUSE_FFMPEG=$(usex ffmpeg)
+               -DUSE_FLASH_ATTENTION=$(usex flash)
                -DUSE_GFLAGS=ON
                -DUSE_GLOG=ON
                -DUSE_GLOO=$(usex gloo)

diff --git a/sci-libs/caffe2/metadata.xml b/sci-libs/caffe2/metadata.xml
index ed1f9fa58993..43aee37ffc47 100644
--- a/sci-libs/caffe2/metadata.xml
+++ b/sci-libs/caffe2/metadata.xml
@@ -9,6 +9,7 @@
                <flag name="distributed">Support distributed applications</flag>
                <flag name="fbgemm">Use FBGEMM</flag>
                <flag name="ffmpeg">Add support for video processing 
operators</flag>
+               <flag name="flash">Enable flash attention</flag>
                <flag name="gloo">Use sci-libs/gloo</flag>
                <flag name="mkl">Use <pkg>sci-libs/mkl</pkg> for blas, lapack 
and sparse blas routines</flag>
                <flag name="nnpack">Use NNPACK</flag>

Reply via email to