Explore the GPU!

Run Standard nvidia-smi Tool


In [ ]:
%%bash 

nvidia-smi

Run Accelerated Linear Algebra (XLA) Tests

Check the generated xla_device_test.log file


In [ ]:
%%bash 

xla_device_test &> xla_device_test.log

Run Some CUDA Code!

Show CUDA Code


In [ ]:
%%bash 

cat /root/src/main/cuda/ArraysSum.cu

Run CUDA Code and Verify the Output Below

...
Awesome! The arrays match.
...

In [ ]:
%%bash 

sum_arrays

Open a Terminal through Jupyter Notebook

(Menu Bar -> Terminal -> New Terminal)

Run this Command to Watch nvidia-smi Every Second:

watch -n 1 nvidia-smi

Run CUDA Code In Loop and Watch nvidia-smi Memory, GPU-Util

Note: Don't get too crazy. You may kill your instance!


In [ ]:
%%bash
for _ in {1..100}
do
  sum_arrays
done

In [ ]: