Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Oct 18, 2024
1 parent 44a1dea commit 7202dbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/public.jl
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ for (dev) in (:CPU, :CUDA, :AMDGPU, :Metal, :oneAPI, :XLA)
(D::$(ldev))(x::Union{Tuple, NamedTuple}) = map(D, x)
function (D::$(ldev))(x)
isleaf(x) && return Adapt.adapt(D, x)
return Functors.fmap(D, x)
return Functors.fmap(D, x, exclude=isleaf)
end
end
end
Expand Down

0 comments on commit 7202dbc

Please sign in to comment.