Commit 36bfdb6
Fix GPU CuArray ambiguity with typed AbstractGPUArray constructor
Disambiguate CuArray(::AbstractArray{T,N}) from CUDA.jl by defining
(::Type{GA})(::AbstractVectorOfArray{T,N}) where {T,N,GA<:AbstractGPUArray}
AbstractVectorOfArray{T,N} is strictly more specific than AbstractArray{T,N}
on arg2, so this method wins dispatch for VectorOfArray arguments.
Uses stack(VA.u) to stay on GPU (avoids GPU→CPU→GPU round-trip).
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 626da00 commit 36bfdb6
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| |||
0 commit comments