CUDA.jl icon indicating copy to clipboard operation
CUDA.jl copied to clipboard

CuSparseMatrix - CuMatrix multiplication not working: giving Scalar Indexing

Open lgravina1997 opened this issue 1 year ago • 16 comments

Multiplying a CuSparseMatrixCSC with a CuArray gives Scalar indexing.

To reproduce:

    CUDA.allowscalar(false)
    A  = cu(sparse([1,2,3], [1,2,3], [1,2,3]))
    B  = cu(rand(3,1))
    C = A*B

or

    CUDA.allowscalar(false)
    A  = cu(sparse([1,2,3], [1,2,3], [1,2,3]))
    B  = cu(rand(3,1))
    C = similar(B)
    mul!(C, A, B)

Both give the same problem of course.

Version info

Details on Julia:

Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700K
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
  Threads: 21 on 20 virtual cores
Environment:
  JULIA_NUM_THREADS = auto
CUDA runtime 12.1, artifact installation
CUDA driver 12.0
NVIDIA driver 525.125.6

CUDA libraries: 
- CUBLAS: 12.1.3
- CURAND: 10.3.2
- CUFFT: 11.0.2
- CUSOLVER: 11.4.5
- CUSPARSE: 12.1.0
- CUPTI: 18.0.0
- NVML: 12.0.0+525.125.6

Julia packages: 
- CUDA: 4.4.1
- CUDA_Driver_jll: 0.5.0+1
- CUDA_Runtime_jll: 0.6.0+0

Toolchain:
- Julia: 1.9.2
- LLVM: 14.0.6
- PTX ISA support: 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 6.0, 6.1, 6.3, 6.4, 6.5, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5
- Device capability support: sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80, sm_86

1 device:
  0: NVIDIA GeForce RTX 3070 (sm_86, 6.158 GiB [/](https://vscode-remote+ssh-002dremote-002b128-002e178-002e67-002e73.vscode-resource.vscode-cdn.net/) 8.000 GiB available)

lgravina1997 avatar Sep 02 '23 10:09 lgravina1997