Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit aa9fc34

Browse files
fix for GPU?
1 parent f9fd755 commit aa9fc34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/differentiation/compute_jacobian_ad.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function ForwardColorJacCache(f::F,x,_chunksize = nothing;
4242
end
4343
else
4444
p = adapt.(parameterless_type(x),generate_chunked_partials(x,colorvec,chunksize))
45-
_t = Dual{T,eltype(x),length(first(first(p)))}.(vec(x),ForwardDiff.Partials.(first(p)))
45+
_t = Dual{T,eltype(x),getsize(chunksize)}.(vec(x),ForwardDiff.Partials.(first(p)))
4646
t = ArrayInterface.restructure(x,_t)
4747
end
4848

0 commit comments

Comments
 (0)