Skip to content

ROCSparseMatrxCSC{<:Complex}*ROCMatrix{<:Real} triggers allowscalar error #904

@abussy

Description

@abussy

Multiplication of complex ROCSparseMatrixCSC and real dense ROCMatrix (and vice-versa) fail with ERROR: LoadError: Scalar indexing is disallowed.. One would expect the multiplication to proceed, and a resulting complex dense ROCMatrix to come out.

Minimal reproducer:

using AMDGPU
using AMDGPU.rocSPARSE
using LinearAlgebra
using SparseArrays

A = ROCSparseMatrixCSC(sprand(Float64, 100, 100, 0.01))
B = AMDGPU.randn(Float64, 100, 100)

C = A * B # works

A = ROCSparseMatrixCSC(sprand(ComplexF64, 100, 100, 0.01))
B = AMDGPU.randn(Float64, 100, 100)

C = A * B # does not work

Note: the issue occurs with CUDA too. See JuliaGPU/CUDA.jl#3128

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions