From f7cf9fd5fba9ab98584dd06d59012008f0940f6c Mon Sep 17 00:00:00 2001 From: tomsmierz Date: Tue, 19 Mar 2024 18:20:01 +0100 Subject: [PATCH] mwe for CUDA problems --- benchmarks/MWE.jl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 benchmarks/MWE.jl diff --git a/benchmarks/MWE.jl b/benchmarks/MWE.jl new file mode 100644 index 00000000..deed8e49 --- /dev/null +++ b/benchmarks/MWE.jl @@ -0,0 +1,22 @@ +using CUDA +using SparseArrays + +a = CUDA.rand(1, 1) +b = cu(sprand(Float64, 1, 1, 1.)) + +# works +b * a +a * b + +# explodes for CUDA driver v12 but works for CUDA driver v11.4, tested on julia 1.9 and 1.10 +c = CUSPARSE.CuSparseMatrixCSC{Float64, Int32}(b.colPtr, b.rowVal, b.nzVal, (1, 1)) +d = CUDA.rand(Float64, 1, 1) + +d * c +c * d + +e = CUSPARSE.CuSparseMatrixCSR(c) +e * d + +# also explodes for CUDA driver v11.4, on both versions of julia +d * e \ No newline at end of file