tensorflow/quantum

Warning while importing `tensorflow-quantum` framework.

Shuhul24 opened this issue · 2 comments

When I am importing tensorflow-quantum library, I get the following warning/error.

2022-12-06 10:55:05.047219: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: :/home/shuhul.handoo/anaconda3/lib/
2022-12-06 10:55:05.060630: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2022-12-06 10:55:05.060763: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (login4.iitbhu.ac.in): /proc/driver/nvidia/version does not exist
2022-12-06 10:55:05.228845: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

Although the code runs, yet this error/warning occurs. What should be done in order to avoid this?

import os
import warnings

warnings.filterwarnings("ignore")
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' 

Should fix most aesthetic warning problems.

Thanks! That worked for me.