Skip to content

Commit e6a9cd9

Browse files
committed
refactor: move Adapt into main deps
1 parent e2ca620 commit e6a9cd9

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ authors = ["William Moses <[email protected]>", "Valentin Churavy <[email protected]
44
version = "0.2.1"
55

66
[deps]
7+
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
78
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
89
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
910
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
@@ -14,13 +15,11 @@ Reactant_jll = "0192cb87-2b54-54ad-80e0-3be72ad8a3c0"
1415
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
1516

1617
[weakdeps]
17-
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
1818
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
1919
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
2020
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2121

2222
[extensions]
23-
ReactantAdaptExt = "Adapt"
2423
ReactantArrayInterfaceExt = "ArrayInterface"
2524
ReactantNNlibExt = "NNlib"
2625
ReactantStatisticsExt = "Statistics"

ext/ReactantAdaptExt.jl

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/ConcreteRArray.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ end
1010

1111
ConcreteRArray(data::T) where {T<:Number} = ConcreteRArray{T,0}(data, ())
1212

13+
Adapt.adapt_storage(::Type{T}, x::AbstractArray) where {T<:ConcreteRArray} = T(x)
14+
1315
function ConcreteRArray(
1416
data::Array{T,N}; client=XLA.default_backend[], idx=XLA.default_device_idx[]
1517
) where {T,N}

src/Reactant.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module Reactant
22

3+
using Adapt: Adapt
4+
35
# auxiliary types and functions
46
include("OrderedIdDict.jl")
57

0 commit comments

Comments
 (0)