Skip to content

Commit 988dd6d

Browse files
Update gpu.md
1 parent 95b0bb2 commit 988dd6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/gpu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ m = fmap(cu, m)
4949
d(cu(rand(10)))
5050
```
5151

52-
As a convenience, Flux provides the `gpu` function to convert models and data to the GPU if one is available. By default, it'll do nothing, but loading `CUDA` will cause it to move data to the GPU instead.
52+
As a convenience, Flux provides the `gpu` function to convert models and data to the GPU if one is available. By default, it'll do nothing, meaning that you can safely call `gpu` on some data or model (as shown below), and the code will not error, regardless of whether the GPU is available or not. If the GPU loads successfully, `CUDA` will cause the data to move to the GPU from the CPU. As is shown below, this will change the type of something like a regualar array to a `CuArray`.
5353

5454
```julia
5555
julia> using Flux, CUDA

0 commit comments

Comments
 (0)