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

Abstract type aliases do not match expected types

Open maleadt opened this issue 1 year ago • 0 comments

For example, AbstractGPUVecOrMat:

julia> LinearAlgebra.Adjoint{Float64, Matrix{Float64}} <: AbstractVecOrMat
true

julia> LinearAlgebra.Adjoint{Float64, CuMatrix{Float64}} <: GPUArrays.AbstractGPUVecOrMat
false

... because Adjoint is <: AbstractArray but not <: AbstractGPUArray. This is bad, because it breaks a bunch of generic code, e.g., https://github.com/JuliaLang/julia/pull/53611#issuecomment-2045278635.

I guess this is https://github.com/JuliaLang/julia/issues/51910, however we probably need a different fix in the short term.

maleadt avatar Apr 09 '24 14:04 maleadt