Michal Harakal
12/09/2020, 5:48 PMdef gpu_is_available():
"""
Returns True if Tensorflow is installed and uses GPU
"""
return tf.test.is_gpu_available()
Maria Khalusova
12/09/2020, 5:54 PMzaleslaw
12/09/2020, 6:13 PM2020-12-09 21:09:10.748923: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2020-12-09 21:09:10.817212: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-12-09 21:09:10.826129: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2020-12-09 21:09:11.097180: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce GTX 1650 major: 7 minor: 5 memoryClockRate(GHz): 1.56
pciBusID: 0000:01:00.0
2020-12-09 21:09:11.097211: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2020-12-09 21:09:11.328995: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2020-12-09 21:09:11.558253: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll
2020-12-09 21:09:11.586795: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll
2020-12-09 21:09:11.846481: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll
2020-12-09 21:09:12.065723: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll
2020-12-09 21:09:12.352519: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2020-12-09 21:09:12.352603: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2020-12-09 21:09:12.904036: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-12-09 21:09:12.904053: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0
2020-12-09 21:09:12.904057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N
2020-12-09 21:09:12.904244: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2917 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1650, pci bus id: 0000:01:00.0, compute capability: 7.5)
P.S. also I commited an option to specify the device to execute TF operand like deviceSpec in Python. Hope it will be available in the next releases. https://github.com/tensorflow/java/pull/159zaleslaw
12/09/2020, 6:17 PMMichal Harakal
12/09/2020, 7:22 PM