You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the CPU, calling sparse(I, J, V) allows for repeated (i, j) pairs, and the corresponding values v are added.
This is very useful for creating discretizations in 2D and 3D.
With CUDA, the entries are kept separate. Only the first value with repeated index is displayed.
I would expect sparse(cu(I), cu(J), cu(V)) to display the same matrix as sparse(I, J, V), i.e. the value at position [4, 3] should be 13.0, not 3.0. It seems the CUDA version does not merge the entries, but keeps them separate.
Version info
Details on Julia:
julia>versioninfo()
Julia Version 1.10.0-rc1
Commit 5aaa9485436 (2023-11-0307:44 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU:32×13th Gen Intel(R) Core(TM) i9-13900K
WORD_SIZE:64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads:1 on 32 virtual cores
Describe the bug
On the CPU, calling
sparse(I, J, V)
allows for repeated(i, j)
pairs, and the corresponding valuesv
are added.This is very useful for creating discretizations in 2D and 3D.
With CUDA, the entries are kept separate. Only the first value with repeated index is displayed.
To reproduce
The Minimal Working Example (MWE) for this bug:
Manifest.toml
Expected behavior
I would expect
sparse(cu(I), cu(J), cu(V))
to display the same matrix assparse(I, J, V)
, i.e. the value at position[4, 3]
should be13.0
, not3.0
. It seems the CUDA version does not merge the entries, but keeps them separate.Version info
Details on Julia:
Details on CUDA:
Additional context
Same issue on Julia v1.9.4.
The text was updated successfully, but these errors were encountered: