Tensorflow on Snowy and Bianca

This is a short tutorial about how to use the tensorflow python package using GPU on Snowy. Check "Using the GPU nodes on Snowy" for  ways to ask Slurm for GPU resources.

Load the python Machine Language module

$  module load python_ML_packages/3.9.5-gpu

Start a Python session

$  python
Python 3.9.5 (default, Jun  3 2021, 15:06:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> print(tf.test.gpu_device_name())
2022-01-28 14:38:13.166313: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /device:GPU:0 with 13793 MB memory:  -> device: 0, name: Tesla T4, pci bus id: 0000:08:00.0, compute capability: 7.5
/device:GPU:0

Last modified: 2022-06-09