Skip to content

Commit

Permalink
Fix conversion of tuples to GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
dfdx committed Feb 2, 2020
1 parent a069933 commit 268c75d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ function to_device(device::GPU, x)
return x
elseif isa(x, Real)
return Float32(x)
elseif isa(x, Tuple)
return ((to_device(device, el) for el in x)...,)
elseif isempty(flds)
# primitive or array
return cu(x)
Expand Down

0 comments on commit 268c75d

Please sign in to comment.