Commit 69798c3
Fix GPU CuArray ambiguity and type-stable sum for LTS
- Fix CuArray ambiguity: replace (T::Type{<:AnyGPUArray})(VA) = T(Array(VA))
with T(stack(VA.u)) and add N type parameter to disambiguate against
CuArray(::AbstractArray{T,N}) from CUDA.jl
- Add type-stable Base.sum(VA::AbstractVectorOfArray) that reduces over
.u to avoid inference failure on Julia 1.10 with deeply nested type
parameters (fixes @inferred sum(VA[VA[zeros(4,4)]]) on LTS)
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4a17e3c commit 69798c3
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1121 | 1131 | | |
1122 | 1132 | | |
1123 | 1133 | | |
| |||
0 commit comments