Skip to content

Commit 7a38453

Browse files
Fix GPU test: convert(AbstractArray, va) is now identity
Since AbstractVectorOfArray <: AbstractArray, convert(AbstractArray, va) returns va itself. Use stack(va.u) to get a dense CuArray instead. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9346213 commit 7a38453

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/gpu/vectorofarray_gpu.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function f(p)
3636
end
3737
Zygote.gradient(f, p)
3838

39-
# Check conversion preserves device
40-
va_cu = convert(AbstractArray, va)
39+
# Check conversion to dense GPU array
40+
va_cu = stack(va.u)
4141

4242
@test va_cu isa CuArray
4343
@test size(va_cu) == size(x)

0 commit comments

Comments
 (0)