Skip to content

Commit c23431b

Browse files
Update docs/src/gpu.md
Co-authored-by: Kyle Daruwalla <daruwalla.k.public@icloud.com>
1 parent 988dd6d commit c23431b

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, 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`.
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. So, 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)