JuliaGPU / Adapt.jl

Other
86 stars 24 forks source link

`Adapt.ndims` errors for Symmetric CuMatrix #74

Closed avik-pal closed 6 months ago

avik-pal commented 7 months ago
julia> using CUDA, LinearAlgebra, Adapt

julia> A = Symmetric(cu(Hermitian(rand(4, 4) + I)))
4×4 Symmetric{Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}:
 1.04768   0.762224  0.417242   0.939324
 0.762224  1.32384   0.885197   0.406453
 0.417242  0.885197  1.21459    0.0398361
 0.939324  0.406453  0.0398361  1.74983

julia> Adapt.ndims(typeof(A))
ERROR: UndefVarError: `N` not defined
Stacktrace:
 [1] ndims(::Type{Symmetric{Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}})
   @ Adapt /mnt/julia/packages/Adapt/yYvku/src/wrappers.jl:132
 [2] top-level scope
   @ REPL[17]:1
 [3] top-level scope
   @ /mnt/julia/packages/Infiltrator/LtFao/src/Infiltrator.jl:726
 [4] top-level scope
   @ /mnt/julia/packages/CUDA/YIj5X/src/initialization.jl:208
avik-pal commented 7 months ago

Actually, this is fixed on the master. @maleadt can we tag a patch release of master

maleadt commented 6 months ago

Fixed by https://github.com/JuliaGPU/Adapt.jl/pull/73. Let's tag a release.