tensorflow-opencl
tensorflow-opencl copied to clipboard
AMD GPU device not found, but GPU test passed
System Info:
OS: Ubuntu 16.04 CUDA version: None GPU: Advanced Micro Devices, Inc. [AMD/ATI] Richland [Radeon HD 8650G] TensorFlow Build: Source
I ran the bazel gpu test with the command:
bazel test -c opt --verbose_failures --test_timeout 3600 //tensorflow/python/kernel_tests:basic_gpu_test
which it passed.
However, I am trying to run someone else's code found here:
https://github.com/cysmith/neural-style-tf
command I run is:
bash stylize_image.sh ./image_input/lion.jpg ./styles/kandinsky.jpg
which gives me the error:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation 'Variable': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device. [[Node: Variable = VariableV2container="", dtype=DT_FLOAT, shape=[1,512,512,3], shared_name="", _device="/device:GPU:0"]]
How should I change the code to get it to work with my AMD GPU?
The latest OpenCL for TensorFlow work now lives here https://github.com/codeplaysoftware/tensorflow You can follow the guide here https://developer.codeplay.com/products/computecpp/ce/guides/tensorflow-guide/tensorflow-generic-setup