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 : .\backward_warp_op.so not found #67

Open
yoryory opened this issue May 20, 2019 · 2 comments
Open

error : .\backward_warp_op.so not found #67

yoryory opened this issue May 20, 2019 · 2 comments

Comments

@yoryory
Copy link

yoryory commented May 20, 2019

hey i got that error when running "tun.py"
i saw the previos issues num 23 and 39 tried to do as they said but still got that error

ubunto 16
cuda 9
tnesorflow 1.7 (i also tried with 1.12/1.13)
also try on windows 10 with cuda 9
got the same problem what can i do

@ReekiLee
Copy link

@yoryory
Same with me. Have you solved it?

@ReekiLee
Copy link

ReekiLee commented Dec 4, 2021

Hello, @simonmeister @yoryory
I solved the compilation problem in TF1.15+CUDA10.0. Hope my experience could help you.

The error I met is like this:
backward_warp_op.cu.cc:8:53: fatal error: tensorflow/core/util/cuda_kernel_helper.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "/root/UnFlow/src/e2eflow/ops.py", line 59, in
op_lib = tf.load_op_library(lib_path)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/tensorflow_core/python/framework/load_library.py", line 61, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: ./backward_warp_op.so: cannot open shared object file: No such file or directory

Step1. Substitude cuda_kernel_helper.h with gpu_kernel_helper in xxx_op.cu.cc
(referrence: https://github.com/tensorflow/tensorflow/issues/31349)
And you will get the next error:
In file included from backward_warp_op.cu.cc:8:0:
/usr/local/python3.7.5/lib/python3.7/site-packages/tensorflow_core/include/tensorflow/core/util/gpu_kernel_helper.h:22:53: fatal error: thi_party/gpus/cuda/include/cuda_fp16.h: No such file or directory
compilation terminated.

Step2. Change #include "third_party/gpus/cuda/include/cuda_fp16.h" to #include "cuda_fp16.h" in gpu_kernel_helper.h
Then you will get this error:
In file included from /usr/local/python3.7.5/lib/python3.7/site-packages/tensorflow_core/include/tensorflow/core/util/gpu_kernel_helper.h:20,
from backward_warp_op.cu.cc:8:
/usr/local/python3.7.5/lib/python3.7/site-packages/tensorflow_core/include/tensorflow/core/util/gpu_device_functions.h:34:53: fatal error: third_party/gpus/cuda/include/cuComplex.h: No such file or directory

Just like the operation above, change #include "third_party/gpus/cuda/include/cuComplex.h" to #include "cuComplex.h"
The next error is like this:
In file included from /usr/local/python3.7.5/lib/python3.7/site-packages/tensorflow_core/include/tensorflow/core/util/gpu_kernel_helper.h:26:0,
from backward_warp_op.cu.cc:8:
/usr/local/python3.7.5/lib/python3.7/site-packages/tensorflow_core/include/tensorflow/core/util/gpu_device_functions.h:36:48: fatal error: third_party/gpus/cuda/include/cuda.h: No such file or directory
compilation terminated.
Again, change #include "third_party/gpus/cuda/include/cuda.h" into #include "cuda.h"

Note that please check the error message for the specific path of the file to be modified.

Then you will get this error:
/usr/local/python3.7.5/lib/python3.7/site-packages/tensorflow_core/include/absl/strings/string_view.h(495): error: constexpr function return is non-constant

1 error detected in the compilation of "/tmp/tmpxft_00006d42_00000000-6_backward_warp_op.cu.cpp1.ii".

Step3. add flag -DNDEBUG in Line about nvcc++ in file UnFlow/src/e2eflow/ops.py

Step4. copy some lib like:
cp -r /usr/local/cuda-10.0/include/
/usr/local/python3.7.5/lib/python3.7/site-packages/tensorflow_core/include/third_party/gpus/cuda/include
*
(referrence: https://github.com/tensorflow/custom-op)

Finally, you can compile the .so files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants