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

Commit

Permalink
Revert "Update LuxDeviceUtils.jl"
Browse files Browse the repository at this point in the history
This reverts commit 023fb2a.
  • Loading branch information
avik-pal committed Jun 26, 2023
1 parent 023fb2a commit 983e735
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LuxDeviceUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ struct LuxCUDAAdaptor <: AbstractLuxDeviceAdaptor end
struct LuxAMDGPUAdaptor <: AbstractLuxDeviceAdaptor end
struct LuxMetalAdaptor <: AbstractLuxDeviceAdaptor end

function adapt_structure(::LuxCPUAdaptor,
function adapt_storage(::LuxCPUAdaptor,
x::Union{AbstractRange, SparseArrays.AbstractSparseArray})
return x
end
adapt_structure(::LuxCPUAdaptor, x::AbstractArray) = adapt(Array, x)
adapt_structure(::LuxCPUAdaptor, rng::AbstractRNG) = rng
adapt_storage(::LuxCPUAdaptor, x::AbstractArray) = adapt(Array, x)
adapt_storage(::LuxCPUAdaptor, rng::AbstractRNG) = rng

_isbitsarray(::AbstractArray{<:Number}) = true
_isbitsarray(::AbstractArray{T}) where {T} = isbitstype(T)
Expand Down

2 comments on commit 983e735

@avik-pal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/86309

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.1 -m "<description of version>" 983e73580d8d94ff9a6542f9f1cf6c45c5bf5dd7
git push origin v0.1.1

Please sign in to comment.