Skip to content

Commit 874fb50

Browse files
committed
Get rid of doctests in gpu.md as GH Actions have no GPU
1 parent 5e8ecb4 commit 874fb50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/gpu.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ NVIDIA GPU support should work out of the box on systems with CUDA and CUDNN ins
66

77
By default, Flux will run the checks on your system to see if it can support GPU functionality. You can check if Flux identified a valid GPU setup by typing the following:
88

9-
```jldoctest gpu; setup = :(using Random; Random.seed!(0))
9+
```julia
1010
julia> using CUDA
1111

1212
julia> CUDA.functional()
@@ -51,7 +51,7 @@ d(cu(rand(10)))
5151

5252
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 library (CUDA.jl) loads successfully, `gpu` will move data from the CPU to the GPU. As is shown below, this will change the type of something like a regular array to a `CuArray`.
5353

54-
```jldoctest gpu
54+
```julia
5555
julia> using Flux, CUDA
5656

5757
julia> m = Dense(10, 5) |> gpu
@@ -81,7 +81,7 @@ julia> m(x)
8181

8282
The analogue `cpu` is also available for moving models and data back off of the GPU.
8383

84-
```jldoctest gpu
84+
```julia
8585
julia> x = rand(10) |> gpu
8686
10-element CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}:
8787
0.8019236

0 commit comments

Comments
 (0)