Skip to content

Scalar indexing on +(::Symmetric, ::Symmetric) #3043

@jonas-schulze

Description

@jonas-schulze

The Minimal Working Example (MWE) for this bug:

using CUDA, CUDA.CUSPARSE
using LinearAlgebra
using SparseArrays
using Test

n = 10
A = sprandn(n, n, 2/n)

@testset "$T" for T in (
    CuSparseMatrixCSC,
    CuSparseMatrixCSR,
    CuSparseMatrixCOO, # broken as well, but not important to me
)
    global Ad = T(A)
    @test_broken Ad' + Symmetric(Ad) isa T # scalar indexing
    @test_broken Ad + Symmetric(Ad) isa T # scalar indexing
    @test_broken Symmetric(Ad) + Symmetric(Ad) isa AbstractMatrix # scalar indexing
    # ...ideally, the last should be a Symmetric, though.
end

Project.zip (same as #3042)

Expected behavior

It should just work.

Version info

Same as #3042.

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