| gpuAvailable | R Documentation |
Reports whether gputools can use a CUDA device: the package was built
with CUDA, the NVIDIA driver is installed and at least one GPU is
visible. The GPU functions stop with an error when it is FALSE.
gpuAvailable()
A gputools installed where configure could not find the CUDA toolkit
(for example a binary built on a server without CUDA) loads, but its
GPU functions cannot run; it says so when attached. Install the NVIDIA
CUDA toolkit (11.7 or later), make it findable – set CUDA_HOME to
its directory, or put nvcc on the PATH – and reinstall
gputools from source.
TRUE, or FALSE with a "reason" attribute
saying why no device can be used.
chooseGpu, getGpuId
if (gpuAvailable()) getGpuId()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.