0

I'm getting into tensorflow starting from very basic stuff. Thing is when I run this:

import tensorflow as tf

const_1 = tf.constant(value=[[1.0, 2.0]],
                      dtype=tf.float32,
                      shape=(1, 2), 
                      name='const_1')
                      print(const_1)

I get a wall of warnings:

2020-04-09 13:34:33.488108: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found

2020-04-09 13:34:33.488461: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2020-04-09 13:34:36.674495: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found

2020-04-09 13:34:36.674803: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: UNKNOWN ERROR (303)

2020-04-09 13:34:36.680089: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: LAPTOP-QKJU2QKP

2020-04-09 13:34:36.680280: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: LAPTOP-QKJU2QKP

2020-04-09 13:34:36.681089: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

2020-04-09 13:34:36.695812: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2012160e230 initialized for platform Host (this does not guarantee that XLA will be used). Devices:

2020-04-09 13:34:36.696238: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version

What am I doing wrong? I read that i can't install cuda since i have amd gpu. Also don't know if it's important but tensorflow is installed through pycharm.

Kalana
  • 5,631
  • 7
  • 30
  • 51

2 Answers2

2

As stated in the other answer, it seems to be fine. If the warnings annoy you, you can either install silence_tensorflow with pip or

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

before you import Tensorflow.

arckoor
  • 320
  • 3
  • 13
0

W, I and E all stand for (warning, information and error), just like the logging module from Python.

The messages, as you displayed them tell you that:

  1. CuDNN .dll is not found(used for running on GPU)
  2. Additional information + one error for not being able to fetch the necessary libraries for GPU usage
  3. Finally deferring to CPU.

You have done nothing wrong in your process.

Timbus Calin
  • 13,809
  • 5
  • 41
  • 59