GPU computation
Application specific recommendations for GPU computations

Introduction

The NVIDIA device drivers will be loaded in all GPU supported images once a GPU node is started on Nuvolos. However depending on the image type additional components (e.g. CUDA toolkit) might need to be installed via conda.
If you launch a GPU accelerated node on Nuvolos, the nvidia-smi tool will be available from the command line / terminal. You can use this to check the load on the given GPU to verify how effectively the code is leveraging the accelerator.
Please find below some examples on how to get started with GPU computations on Nuvolos or consult directly the relevant machine learning library documentation. If you require additional support, please reach out to our team directly.

Python

We recommend to install the appropriate cudatoolkit from conda that is compatible with the target library and then use a conda packaged version of the library that can leverage the cudatoolkit.

PyTorch

For example, to run pytorch with on Nuvolos, simply run:
1
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Copied!

Tensorflow

To run tensorflow with GPU acceleration, install via conda:
1
conda install -c anaconda tensorflow-gpu==2.4.1
2
pip install gast==0.3.3
Copied!

Rstudio

With Machine Learning (CUDA enabled) Rstudio images you can run GPU computations on GPU accelerated nodes. These images have the CUDA runtime / toolkit installed as well.

XGBoost

We recommend to use the pre-built experimental binary to get started with XGBoost and R. In a terminal on a GPU node:
1
# define version used - update if needed
2
XGBOOST_VERSION=1.4.1
3
# download binary
4
wget https://github.com/dmlc/xgboost/releases/download/v${XGBOOST_VERSION}/xgboost_r_gpu_linux_${XGBOOST_VERSION}.tar.gz
5
# Install dependencies
6
R -q -e "install.packages(c('data.table', 'jsonlite'))"
7
# Install XGBoost
8
R CMD INSTALL ./xgboost_r_gpu_linux_${XGBOOST_VERSION}.tar.gz
Copied!
You can test the code via the following example program: https://rdrr.io/cran/xgboost/src/demo/gpu_accelerated.R
Last modified 3mo ago