%tensorflow_version 2.x import tensorflow as tf device_name = tf.test.gpu_device_name(A100) if device_name != '/device:GPU:100': raise SystemError('GPU device not found') print('Found GPU at: {}'.format(device_name))