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

Error when compiling custom ops (GPU) #30

Closed
mi2celis opened this issue Jul 6, 2021 · 2 comments
Closed

Error when compiling custom ops (GPU) #30

mi2celis opened this issue Jul 6, 2021 · 2 comments

Comments

@mi2celis
Copy link

mi2celis commented Jul 6, 2021

When compiling the custom ops GPU support I get the error below from a tensorflow header file

Followed instructions for setting compile and loader flags
TF_CFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') )
TF_LFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))') )
OP_NAME='deeplab2/tensorflow_ops/kernels/merge_semantic_and_instance_maps_op'

Compiling for CPU completed without error

Compiling for GPU
nvcc -std=c++14 -c -o ${OP_NAME}_kernel.cu.o ${OP_NAME}_kernel.cu.cc ${TF_CFLAGS[@]} -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC --expt-relaxed-constexpr

/home/mimi/Envs/deeplab2/lib/python3.6/site-packages/tensorflow/include/tensorflow/core/platform/file_system.h(556): warning: overloaded virtual function "tensorflow::FileSystem::FilesExist" is only partially overridden in class "tensorflow::WrappedFileSystem"

...
snip
...

/home/mimi/Envs/deeplab2/lib/python3.6/site-packages/tensorflow/include/absl/functional/function_ref.h:\100:29: error: parameter packs not expanded with ‘...’:
template <typename F, typename = EnableIfCompatible<const F&>>

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mimi/Envs/deeplab2/lib/python3.6/site-packages/tensorflow/include/absl/functional/function_ref.h:\100:29: note: ‘Args’
/home/mimi/Envs/deeplab2/lib/python3.6/site-packages/tensorflow/include/absl/functional/function_ref.h:114:13: error: parameter packs not expanded with ‘...’:
typename F, typename = EnableIfCompatible<F*>,

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

tensorflow-gpu 2.5.0

Any suggestions?

@markweberdev
Copy link
Collaborator

Hi,

These issues might be related to your CUDA version. Tensorflow 2.5 officially only supports CUDA 11.2. Please give us an update on whether this problem still persists.

Best,
Mark

@mi2celis
Copy link
Author

mi2celis commented Jul 7, 2021

That was it. Even though I have cuda 11.2 installed, nvcc 10 was still in my /usr/bin
Removed all nvidia and cuda installs and reinstalled 11.2 .
Thanks!

@mi2celis mi2celis closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants