Skip to content

Commit 38cb97f

Browse files
authored
Merge pull request #2403 from CliMA/js/to-device
add dispatch back in to_device
2 parents 24d6838 + 8459b18 commit 38cb97f

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ main
55
-------
66

77

8+
v0.14.44
9+
-------
10+
11+
- Revert `to_device` dispatch change from #2375 [2403](https://github.com/CliMA/ClimaCore.jl/pull/2403)
12+
813
v0.14.43
914
-------
1015

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ClimaCore"
22
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
33
authors = ["CliMA Contributors <clima-software@caltech.edu>"]
4-
version = "0.14.43"
4+
version = "0.14.44"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/to_device.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ If the input is already defined on the target device, returns a copy.
1818
1919
This means that `out === x` will not in general be satisfied.
2020
"""
21-
function to_device(device::ClimaComms.AbstractDevice, x)
21+
function to_device(
22+
device::ClimaComms.AbstractDevice,
23+
x::Union{
24+
DataLayouts.AbstractData,
25+
Spaces.AbstractSpace,
26+
Fields.Field,
27+
Fields.FieldVector,
28+
},
29+
)
2230
return Adapt.adapt(ClimaComms.array_type(device), x)
2331
end
2432

0 commit comments

Comments
 (0)