File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import ..DataLayouts,
16
16
.. Hypsography
17
17
import ClimaCore. Utilities: half
18
18
import ClimaCore. Spaces: cuda_synchronize
19
- import .. to_cpu
19
+ import Adapt
20
20
21
21
using .. RecursiveApply
22
22
Original file line number Diff line number Diff line change @@ -399,10 +399,11 @@ function _Remapper(
399
399
)
400
400
num_dims = num_hdims
401
401
else
402
- cpu_space = if ClimaComms. device (space) isa ClimaComms. AbstractCPUDevice
402
+ device = ClimaComms. device (space)
403
+ cpu_space = if device isa ClimaComms. AbstractCPUDevice
403
404
space
404
405
else
405
- to_cpu ( space)
406
+ Adapt . adapt (ClimaComms . array_type (device), space)
406
407
end
407
408
vert_interpolation_weights =
408
409
ArrayType (vertical_interpolation_weights (cpu_space, target_zcoords))
@@ -471,7 +472,12 @@ function _Remapper(
471
472
cpu_space = if ClimaComms. device (space) isa ClimaComms. AbstractCPUDevice
472
473
space
473
474
else
474
- to_cpu (space)
475
+ device = ClimaComms. device (space)
476
+ cpu_space = if device isa ClimaComms. AbstractCPUDevice
477
+ space
478
+ else
479
+ Adapt. adapt (ClimaComms. array_type (device), space)
480
+ end
475
481
end
476
482
477
483
vert_interpolation_weights =
You can’t perform that action at this time.
0 commit comments