commit: 883310f11ac13b90635ce2c768437f09bc255c2f
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Fri May 23 06:49:52 2025 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Fri May 23 06:50:28 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=883310f1
sci-ml/caffe2: add usage of cusparselt
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
sci-ml/caffe2/{caffe2-2.7.0-r1.ebuild => caffe2-2.7.0-r2.ebuild} | 4 +++-
sci-ml/caffe2/metadata.xml | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/sci-ml/caffe2/caffe2-2.7.0-r1.ebuild
b/sci-ml/caffe2/caffe2-2.7.0-r2.ebuild
similarity index 98%
rename from sci-ml/caffe2/caffe2-2.7.0-r1.ebuild
rename to sci-ml/caffe2/caffe2-2.7.0-r2.ebuild
index e4485984f80d..f9d324654e49 100644
--- a/sci-ml/caffe2/caffe2-2.7.0-r1.ebuild
+++ b/sci-ml/caffe2/caffe2-2.7.0-r2.ebuild
@@ -27,7 +27,7 @@ S="${WORKDIR}"/${MYP}
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
-IUSE="cuda distributed fbgemm flash gloo memefficient mkl mpi nnpack +numpy
+IUSE="cuda cusparselt distributed fbgemm flash gloo memefficient mkl mpi
nnpack +numpy
onednn openblas opencl openmp qnnpack rocm xnnpack"
RESTRICT="test"
REQUIRED_USE="
@@ -61,6 +61,7 @@ RDEPEND="
dev-libs/cudnn
>=sci-ml/cudnn-frontend-1.0.3:0/8
dev-util/nvidia-cuda-toolkit:=[profiler]
+ cusparselt? ( dev-libs/cusparselt )
)
fbgemm? ( sci-ml/FBGEMM )
gloo? ( sci-ml/gloo[cuda?] )
@@ -284,6 +285,7 @@ src_configure() {
-DTORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-3.5
7.0}"
-DUSE_NCCL=OFF # TODO: NVIDIA Collective Communication
Library
-DCMAKE_CUDA_FLAGS="$(cuda_gccdir -f | tr -d \")"
+ -DUSE_CUSPARSELT=$(usex cusparselt)
)
elif use rocm; then
export PYTORCH_ROCM_ARCH="$(get_amdgpu_flags)"
diff --git a/sci-ml/caffe2/metadata.xml b/sci-ml/caffe2/metadata.xml
index 2483e58ed39e..961dd624f404 100644
--- a/sci-ml/caffe2/metadata.xml
+++ b/sci-ml/caffe2/metadata.xml
@@ -6,6 +6,7 @@
<name>Tupone Alfredo</name>
</maintainer>
<use>
+ <flag name="cusparselt">Use the CUDA Sparse Matrix
Multiplication</flag>
<flag name="distributed">Support distributed applications</flag>
<flag name="fbgemm">Use <pkg>sci-ml/FBGEMM</pkg></flag>
<flag name="flash">Enable flash attention</flag>