3

I installed Tensorflow GPU and I can see it in Terminal on Ubuntu 18.04.

>>> from tensorflow.python.client import device_lib
>>> print(device_lib.list_local_devices())

And result is:

2018-08-21 16:34:49.867482: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0
2018-08-21 16:34:49.867602: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-08-21 16:34:49.867627: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971]      0 
2018-08-21 16:34:49.867650: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0:   N 
2018-08-21 16:34:49.867979: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/device:GPU:0 with 6863 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 10929943929948782169
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 7196478669
locality {
  bus_id: 1
  links {
  }
}
incarnation: 1784950594023049308
physical_device_desc: "device: 0, name: GeForce GTX 1070 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1"
]

But when I run it in PyCharm I get

/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 12856835725849494278
]
2018-08-21 16:38:54.238307: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

Process finished with exit code 0
bad_coder
  • 11,289
  • 20
  • 44
  • 72
IK KLX
  • 121
  • 2
  • 14
  • Read these two links. They claim it is benign.https://stackoverflow.com/questions/40845304/runtimewarning-numpy-dtype-size-changed-may-indicate-binary-incompatibility https://github.com/ContinuumIO/anaconda-issues/issues/6678#issuecomment-337279157 – Mohan Radhakrishnan Aug 21 '18 at 14:12
  • @MohanRadhakrishnan I have read it but don't understand how can it help me. – IK KLX Aug 21 '18 at 15:27
  • It appears to be a warning. Do you see any problem ? PyCharm uses the python you specify. – Mohan Radhakrishnan Aug 22 '18 at 06:22
  • @MohanRadhakrishnan yes there are no problems, but I don't understand why in jupyter or terminal I can use GPU and in PyCharm can't. – IK KLX Aug 22 '18 at 07:26

1 Answers1

1

I have fixed it. I changed Project interpreter in PyCharm and now it's work for me.

IK KLX
  • 121
  • 2
  • 14