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

Commit 2c96c6e

Browse files
committed
Minor mistake in NT version
1 parent cfb396c commit 2c96c6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LuxDeviceUtils.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ for (dev) in (:CPU, :CUDA, :AMDGPU, :Metal)
222222
return _isbitsarray(x) ? fn(x) : map(fn, x)
223223
end
224224
(::$(ldev))(x::Tuple) = map(Base.Fix1(adapt, $(ladaptor)()), x)
225-
(::$(ldev))(x::NamedTuple{F}) where {F} = NamedTuple{F}($(ldev)(values(x)))
225+
(dev::$(ldev))(x::NamedTuple{F}) where {F} = NamedTuple{F}(dev(values(x)))
226226
function (::$(ldev))(x)
227227
_isleaf(x) && return adapt($(ladaptor)(), x)
228228
return fmap(Base.Fix1(adapt, $(ladaptor)()), x; exclude=_isleaf)

0 commit comments

Comments
 (0)