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

Commit 023fb2a

Browse files
authored
Update LuxDeviceUtils.jl
1 parent b71b2f0 commit 023fb2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/LuxDeviceUtils.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ struct LuxCUDAAdaptor <: AbstractLuxDeviceAdaptor end
224224
struct LuxAMDGPUAdaptor <: AbstractLuxDeviceAdaptor end
225225
struct LuxMetalAdaptor <: AbstractLuxDeviceAdaptor end
226226

227-
function adapt_storage(::LuxCPUAdaptor,
227+
function adapt_structure(::LuxCPUAdaptor,
228228
x::Union{AbstractRange, SparseArrays.AbstractSparseArray})
229229
return x
230230
end
231-
adapt_storage(::LuxCPUAdaptor, x::AbstractArray) = adapt(Array, x)
232-
adapt_storage(::LuxCPUAdaptor, rng::AbstractRNG) = rng
231+
adapt_structure(::LuxCPUAdaptor, x::AbstractArray) = adapt(Array, x)
232+
adapt_structure(::LuxCPUAdaptor, rng::AbstractRNG) = rng
233233

234234
_isbitsarray(::AbstractArray{<:Number}) = true
235235
_isbitsarray(::AbstractArray{T}) where {T} = isbitstype(T)

0 commit comments

Comments
 (0)