Skip to content

Commit

Permalink
mwe for CUDA problems
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsmierz committed Mar 19, 2024
1 parent 937c494 commit f7cf9fd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions benchmarks/MWE.jl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f7cf9fd

Please sign in to comment.