commit:     4a8fcb9ea867260aad9ab370ec859fd5d34c2cc6
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Wed Jan 28 15:14:42 2026 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Jan 28 17:40:03 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a8fcb9e

sci-ml/caffe2: 2.10.0 pass cuda config to flash attention

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 sci-ml/caffe2/{caffe2-2.10.0.ebuild => caffe2-2.10.0-r1.ebuild} | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sci-ml/caffe2/caffe2-2.10.0.ebuild 
b/sci-ml/caffe2/caffe2-2.10.0-r1.ebuild
similarity index 98%
rename from sci-ml/caffe2/caffe2-2.10.0.ebuild
rename to sci-ml/caffe2/caffe2-2.10.0-r1.ebuild
index 49e30459b5c9..559439f586d2 100644
--- a/sci-ml/caffe2/caffe2-2.10.0.ebuild
+++ b/sci-ml/caffe2/caffe2-2.10.0-r1.ebuild
@@ -342,6 +342,14 @@ src_configure() {
                        -DCMAKE_CUDA_FLAGS="$(cuda_gccdir -f | tr -d \")"
                        -DUSE_CUSPARSELT=$(usex cusparselt)
                )
+
+               [[ -v CUDACXX ]] && export PYTORCH_NVCC="${CUDACXX}"
+
+               if use flash; then
+                       export FLASH_ATTENTION_FORCE_BUILD="TRUE"
+                       export 
FLASH_ATTN_CUDA_ARCHS="${CUDAARCHS:-${TORCH_CUDA_ARCH_LIST:-3.5 7.0}}"
+               fi
+
        elif use rocm; then
                export PYTORCH_ROCM_ARCH="$(get_amdgpu_flags)"
 

Reply via email to