Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to build GPU custom op example #31912

Closed
alexminnaar opened this issue Aug 23, 2019 · 8 comments
Closed

Not able to build GPU custom op example #31912

alexminnaar opened this issue Aug 23, 2019 · 8 comments
Assignees
Labels
comp:gpu GPU related issues comp:ops OPs related issues stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author TF 1.14 for issues seen with TF 1.14 type:bug Bug

Comments

@alexminnaar
Copy link

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 1.14.0
  • Python version: 3.5
  • CUDA/cuDNN version: 10.0
  • GPU model and memory: GeForce GTX 980M

Describe the current behavior
Following the instructions here I navigate to tensorflow/tensorflow/examples/adding_an_op and run

nvcc -std=c++11 -c -o cuda_op_kernel.cu.o cuda_op_kernel.cu.cc  ${TF_CFLAGS[@]} -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC

and I get the error

In file included from cuda_op_kernel.cu.cc:19:0:
/home/alex/.local/lib/python3.5/site-packages/tensorflow/include/tensorflow/core/util/gpu_kernel_helper.h:22:53: fatal error: third_party/gpus/cuda/include/cuda_fp16.h: No such file or directory
compilation terminated.
@gadagashwini-zz gadagashwini-zz self-assigned this Aug 26, 2019
@gadagashwini-zz gadagashwini-zz added TF 1.14 for issues seen with TF 1.14 comp:gpu GPU related issues type:bug Bug labels Aug 26, 2019
@gadagashwini-zz gadagashwini-zz added the comp:ops OPs related issues label Aug 26, 2019
@jvishnuvardhan
Copy link
Contributor

jvishnuvardhan commented Aug 26, 2019

@alexminnaar

  1. Could you mention with little more what were the steps you took before this error?

  2. It is complaining cuda related kernel: No such file or directory
    Did you check the directory?
    Did you ran any TF code on GPU without the custom_op?

  3. Please check these two resources 1 and 2.
    Thanks!

@jvishnuvardhan jvishnuvardhan added the stat:awaiting response Status - Awaiting response from author label Aug 26, 2019
@alexminnaar
Copy link
Author

@jvishnuvardhan sorry for the delay. Here are some more detailed steps.

  1. Setup new venv and pip installed tensorflow-gpu
  2. cloned the TensorFlow repo
  3. ran TF_CFLAGS=( $(python -c 'import tensorflow as tf; print("".join(tf.sysconfig.get_compile_flags()))') )
  4. Navigated to tensorflow/tensorflow/examples/adding_an_op within the cloned TensorFlow repo.
  5. Followed the instructions outlined here i.e. nvcc -std=c++11 -c -o cuda_op_kernel.cu.o cuda_op_kernel.cu.cc ${TF_CFLAGS[@]} -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC and received the error mentioned above.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Sep 1, 2019
@jvishnuvardhan jvishnuvardhan added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Sep 3, 2019
@kzawisto
Copy link

@alexminnaar
I've stumbled across same problem.

The file you are looking for, third_party/gpus/cuda/include/cuda_fp16.h really comes from your CUDA installation i.e. $CUDA_HOME/include/cuda_fp16.h .

Somehow copy/link does not exist.

How about you go there:
/home/alex/.local/lib/python3.5/site-packages/tensorflow/include/
create directory third_party/gpus/cuda
and then symlink your CUDA include dir here (/usr/local/cuda/include on my Debian box)?

@sanjoy
Copy link
Contributor

sanjoy commented Jan 2, 2020

Relevant comment from @Artem-B: #34428 (comment)

@tensorflowbutler tensorflowbutler removed the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Jan 3, 2020
@Saduf2019 Saduf2019 self-assigned this Jun 11, 2020
@Saduf2019
Copy link
Contributor

@alexminnaar
Please update as per above comment

@Saduf2019 Saduf2019 added the stat:awaiting response Status - Awaiting response from author label Jun 12, 2020
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler google-ml-butler bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Jun 19, 2020
@google-ml-butler
Copy link

Closing as stale. Please reopen if you'd like to work on this further.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:gpu GPU related issues comp:ops OPs related issues stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author TF 1.14 for issues seen with TF 1.14 type:bug Bug
Projects
None yet
Development

No branches or pull requests

8 participants