From e599b8096c181370fd7581fd0c976e6db480ab4e Mon Sep 17 00:00:00 2001 From: Logan Kilpatrick <23kilpatrick23@gmail.com> Date: Sat, 26 Jun 2021 12:47:55 -0500 Subject: [PATCH 1/5] Add section on Checking GPU Availability --- docs/src/gpu.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index ceee92d6c3..d097f062cc 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -2,6 +2,17 @@ NVIDIA GPU support should work out of the box on systems with CUDA and CUDNN installed. For more details see the [CUDA](https://github.com/JuliaGPU/CUDA.jl) readme. +## Checking GPU Availability + +By default, Flux will run the checks on your system to see if it can support GPU functionality. You can check this explicity by typing `Flux.use_cuda[]` which is the internal flag Flux uses. You can also run: + +```julia +julia> using CUDA + +julia> CUDA.functional() +``` +which is part of the internal code that Flux is running to set the `Flux.use_cuda[]` flag. + ## GPU Usage Support for array operations on other hardware backends, like GPUs, is provided by external packages like [CUDA](https://github.com/JuliaGPU/CUDA.jl). Flux is agnostic to array types, so we simply need to move model weights and data to the GPU and Flux will handle it. From a9d04737c98d286078fab90c75ba0bb8c3e62ba7 Mon Sep 17 00:00:00 2001 From: Logan Kilpatrick <23kilpatrick23@gmail.com> Date: Sun, 22 Aug 2021 14:07:04 -0700 Subject: [PATCH 2/5] Update docs/src/gpu.md Co-authored-by: Kyle Daruwalla --- docs/src/gpu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index d097f062cc..a4313831db 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -4,7 +4,7 @@ NVIDIA GPU support should work out of the box on systems with CUDA and CUDNN ins ## Checking GPU Availability -By default, Flux will run the checks on your system to see if it can support GPU functionality. You can check this explicity by typing `Flux.use_cuda[]` which is the internal flag Flux uses. You can also run: +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 `Flux.use_cuda[]` which is the internal flag Flux uses. You can also run: ```julia julia> using CUDA From 06450f79d0505a4b77340d481e39c21c88d77e45 Mon Sep 17 00:00:00 2001 From: Logan Kilpatrick <23kilpatrick23@gmail.com> Date: Sun, 22 Aug 2021 14:08:33 -0700 Subject: [PATCH 3/5] Update gpu.md --- docs/src/gpu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index a4313831db..4a4b2fca6f 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -4,14 +4,14 @@ NVIDIA GPU support should work out of the box on systems with CUDA and CUDNN ins ## Checking GPU Availability -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 `Flux.use_cuda[]` which is the internal flag Flux uses. You can also run: +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: ```julia julia> using CUDA julia> CUDA.functional() ``` -which is part of the internal code that Flux is running to set the `Flux.use_cuda[]` flag. +which is part of the internal code that Flux is running to set the `Flux.use_cuda[]` flag (note this flag is not stable and you should use the code above to check for GPU availability). ## GPU Usage From 39589fdc558fcd19f85c5b2411249e83a302fafe Mon Sep 17 00:00:00 2001 From: Logan Kilpatrick <23kilpatrick23@gmail.com> Date: Mon, 30 Aug 2021 05:45:04 -0700 Subject: [PATCH 4/5] Update docs/src/gpu.md Co-authored-by: Carlo Lucibello --- docs/src/gpu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index 4a4b2fca6f..9e98789954 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -10,6 +10,7 @@ By default, Flux will run the checks on your system to see if it can support GPU julia> using CUDA julia> CUDA.functional() +true ``` which is part of the internal code that Flux is running to set the `Flux.use_cuda[]` flag (note this flag is not stable and you should use the code above to check for GPU availability). From b51f9ac2ddceb317837332ad56ccba90a0a339da Mon Sep 17 00:00:00 2001 From: Logan Kilpatrick <23kilpatrick23@gmail.com> Date: Mon, 30 Aug 2021 05:46:18 -0700 Subject: [PATCH 5/5] remove reference to internal API --- docs/src/gpu.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/src/gpu.md b/docs/src/gpu.md index 9e98789954..58bda29b8c 100644 --- a/docs/src/gpu.md +++ b/docs/src/gpu.md @@ -12,7 +12,6 @@ julia> using CUDA julia> CUDA.functional() true ``` -which is part of the internal code that Flux is running to set the `Flux.use_cuda[]` flag (note this flag is not stable and you should use the code above to check for GPU availability). ## GPU Usage