Skip to content
Permalink
Browse files
add gputest script
  • Loading branch information
marekp committed Mar 23, 2021
1 parent 4b48cd0 commit 67fc206c680de5f91d8041e1d3d27f5017cd02b8
Showing 1 changed file with 12 additions and 0 deletions.
@@ -0,0 +1,12 @@
from distutils.version import LooseVersion
import warnings
import tensorflow as tf

# Check tensorflow version
print(f'Tensorflow version: {tf.__version__}')

# Check for GPU
if not tf.test.gpu_device_name():
warnings.warn('No GPU found')
else:
print(f'Default GPU device: {tf.test.gpu_device_name()}')

0 comments on commit 67fc206

Please sign in to comment.