UnFlow icon indicating copy to clipboard operation
UnFlow copied to clipboard

error : .\backward_warp_op.so not found

Open yoryory opened this issue 6 years ago • 2 comments

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

yoryory avatar May 20 '19 08:05 yoryory

@yoryory Same with me. Have you solved it?

ReekiLee avatar Nov 14 '21 09:11 ReekiLee

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.

ReekiLee avatar Dec 04 '21 09:12 ReekiLee