Skip to content

Introduce AbstractGPUSparseArray #431

@albertomercurio

Description

@albertomercurio

Hello,

dense CuArrays are recognized as AbstractGPUArray type. Indeed, if I do

using CUDA
using GPUArrays

A = CUDA.rand(10, 10)
A isa AbstractGPUArray

it returns true. However, it returns false for a sparse AbstractCuSparseMatrix array, such as CuSparseMatrixCSR type. If I do

A2 = CuSparseMatrixCSR(A)
A2 isa AbstractCuSparseMatrix
A2 isa AbstractGPUArray

the first returns true, while the second not.

I think that the support for sparse types is essential for developing external packages which use if conditions without import the whole CUDA.jl package. Such as the ExponentialUtilities.jl package, which have a special condition only for AbstractGPUArray types, which however fails if I insert a sparse array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions