hcc icon indicating copy to clipboard operation
hcc copied to clipboard

"No device code available for function" with tensorflow

Open yet-another-account opened this issue 6 years ago • 3 comments

HCC version:

$ hcc --version
HCC clang version 8.0.0 (ssh://gerritgit/compute/ec/hcc-tot/clang 6ec3c61e09fbb60373eaf5a40021eb862363ba2c) (ssh://gerritgit/lightning/ec/llvm ab3b88ffc2ae50f55361a49aec89f6e95d9d0ec4) (based on HCC 1.3.18482-757fb49-6ec3c61-ab3b88f )
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm/bin

I am using an RX580 with tensorflow-rocm 1.12.

terminate called after throwing an instance of 'std::runtime_error'
  what():  No device code available for function: _ZN5Eigen8internal15EigenMetaKernelINS_15TensorEvaluatorIKNS_14TensorAssignOpINS_9TensorMapINS_6TensorIfLi1ELi1EiEELi16ENS_11MakePointerEEEKNS_18TensorCwiseUnaryOpINS0_12scalar_rightIffNS0_20scalar_difference_opIffEEEEKNS4_INS5_IKfLi1ELi1EiEELi16ES7_EEEEEENS_9GpuDeviceEEEiEEvT_T0_

yet-another-account avatar Feb 03 '19 19:02 yet-another-account

@eukaryote31 Instead of trying to build TensorFlow on your own, is it possible to use docker images for you? Here are some prepared docker images:

https://hub.docker.com/r/rocm/tensorflow/tags

Or could you try pre-built PIP packages?

https://pypi.org/project/tensorflow-rocm/

If you do need to build TensorFlow from source, could you check if you follow exactly every step described at:

https://github.com/ROCmSoftwarePlatform/tensorflow-upstream/blob/develop-upstream/rocm_docs/tensorflow-build-from-source.md

whchung avatar Feb 04 '19 16:02 whchung

I am already using tensorflow-rocm from pypi.

yet-another-account avatar Feb 05 '19 00:02 yet-another-account

@eukaryote31 What is the output of command rocm_agent_enumerator in your environment?

ghostplant avatar Feb 19 '19 06:02 ghostplant