openvinotoolkit/openvino_tensorflow

Cannot run classification_sample example

benoit-robotics opened this issue · 2 comments

On my machine, the classification_sample example returns this error :

_Create kernel failed: Not found: No registered 'nGraphEncapsulate' OpKernel for 'GPU' devices compatible with node

I am able to successfully run this command :

python3 -c "import tensorflow as tf; print('TensorFlow version: ',tf.version);
import openvino_tensorflow; print(openvino_tensorflow.version)"

The full error message is :

$ python3 examples/classification_sample.py
2021-09-27 14:45:03.705017: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
Available Backends:
CPU
MYRIAD
2021-09-27 14:45:04.998781: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-09-27 14:45:04.999214: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcuda.so.1
2021-09-27 14:45:05.005135: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-09-27 14:45:05.005512: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: Quadro M2200 computeCapability: 5.2
coreClock: 1.036GHz coreCount: 8 deviceMemorySize: 3.94GiB deviceMemoryBandwidth: 82.08GiB/s
2021-09-27 14:45:05.005547: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
2021-09-27 14:45:05.008327: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcublas.so.11
2021-09-27 14:45:05.008417: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcublasLt.so.11
2021-09-27 14:45:05.009473: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcufft.so.10
2021-09-27 14:45:05.009687: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcurand.so.10
2021-09-27 14:45:05.010126: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcusolver.so.11
2021-09-27 14:45:05.010675: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcusparse.so.11
2021-09-27 14:45:05.010834: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudnn.so.8
2021-09-27 14:45:05.010936: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-09-27 14:45:05.011675: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-09-27 14:45:05.012200: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2021-09-27 14:45:05.012250: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
2021-09-27 14:45:05.344618: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-09-27 14:45:05.344663: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] 0
2021-09-27 14:45:05.344670: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0: N
2021-09-27 14:45:05.344869: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-09-27 14:45:05.345291: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-09-27 14:45:05.345681: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-09-27 14:45:05.346057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1418] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3113 MB memory) -> physical GPU (device: 0, name: Quadro M2200, pci bus id: 0000:01:00.0, compute capability: 5.2)
2021-09-27 14:45:05.380470: I tensorflow/core/platform/profile_utils/cpu_utils.cc:114] CPU Frequency: 3000000000 Hz
2021-09-27 14:45:06.246353: OVTF Summary -> 476 out of 480 nodes in the graph (99%) are now running with OpenVINO™ backend
2021-09-27 14:45:06.289576: E tensorflow/core/framework/op_segment.cc:54] Create kernel failed: Not found: No registered '_nGraphEncapsulate' OpKernel for 'GPU' devices compatible with node {{node ovtf_cluster_0}}
. Registered: device='CPU'

if you are running on system with cuda capable device then "export CUDA_VISIBLE_DEVICES=-1". The readme has been updated for the same.

It fixes the issue, thanks.