Skip to content

Scalar indexing with multiplication between a scalar and the adjoint of ROC sparse matrices #854

@ytdHuang

Description

@ytdHuang

Questionnaire

  1. Does ROCm works for you outside of Julia, e.g. C/C++/Python?
    No idea

  2. Post output of rocminfo.
    I don't have a AMD GPU, I get the error while testing our package on JuliaGPU buildkite: https://buildkite.com/julialang/quantumtoolbox-dot-jl/builds/2484/steps/canvas?jid=019ad3d5-11f4-4c43-b1e9-e62e1dae4b2a

  3. Post output of AMDGPU.versioninfo() if possible.


┌───────────┬──────────────────┬───────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
--
│ Available │ Name             │ Version   │ Path                                                                                                              ⋯
├───────────┼──────────────────┼───────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│     +     │ LLD              │ -         │ /opt/rocm-6.4.4/lib/llvm/bin/ld.lld                                                                               ⋯
│     +     │ Device Libraries │ -         │ /root/.cache/julia-buildkite-plugin/depots/0191c5ee-e683-4665-a03b-3f2068748b59/artifacts/5ad5ecb46e3c334821f54c1 ⋯
│     +     │ HIP              │ 6.4.43484 │ /opt/rocm-6.4.4/lib/libamdhip64.so                                                                                ⋯
│     +     │ rocBLAS          │ 4.4.1     │ /opt/rocm-6.4.4/lib/librocblas.so                                                                                 ⋯
│     +     │ rocSOLVER        │ 3.28.2    │ /opt/rocm-6.4.4/lib/librocsolver.so                                                                               ⋯
│     +     │ rocSPARSE        │ 3.4.0     │ /opt/rocm-6.4.4/lib/librocsparse.so                                                                               ⋯
│     +     │ rocRAND          │ 2.10.5    │ /opt/rocm-6.4.4/lib/librocrand.so                                                                                 ⋯
│     +     │ rocFFT           │ 1.0.32    │ /opt/rocm-6.4.4/lib/librocfft.so                                                                                  ⋯
│     +     │ MIOpen           │ 3.4.0     │ /opt/rocm-6.4.4/lib/libMIOpen.so                                                                                  ⋯
└───────────┴──────────────────┴───────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Reproducing the bug

using SparseArrays
using AMDGPU
using AMDGPU.rocSPARSE
AMDGPU.allowscalar(false)

N = 10
a = rand(Float64)
M = ROCSparseMatrixCSC(sprand(ComplexF64, N, N, 0.5))
a * M'
  1. Describe what's not working.

after I tracked the error messages, I think the error comes from:

*(A::Float64, B::LinearAlgebra.Adjoint{ComplexF64, ROCSparseMatrixCSC{ComplexF64, Int32}})

Probably also doesn't work for the other Adjoint and Transpose related cases:

a * transpose(M)
a * M' * M # this is actually what I need

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions