NVIDIA / FastPhotoStyle

Style transfer, deep learning, feature transform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: cannot open source file "/usr/local/cuda/include/math_functions.h"

in3omnia opened this issue · comments

Traceback (most recent call last):
  File "demo.py", line 47, in <module>
    no_post=args.no_post
  File "/home/lyh/FastPhotoStyle/process_stylization.py", line 135, in stylization
    out_img = smooth_filter(out_img, cont_pilimg, f_radius=15, f_edge=1e-1)
  File "/home/lyh/FastPhotoStyle/smooth_filter.py", line 402, in smooth_filter
    best_ = smooth_local_affine(output_, input_, 1e-7, 3, H, W, f_radius, f_edge)
  File "/home/lyh/FastPhotoStyle/smooth_filter.py", line 336, in smooth_local_affine
    ptx = program.compile(['-I/usr/local/cuda/include'])
  File "/home/lyh/.scidev_2018_11_03/.local/lib/python3.6/site-packages/pynvrtc/compiler.py", line 69, in compile
    raise ProgramException(log)
pynvrtc.compiler.ProgramException: best_local_affine_kernel.cu(2): catastrophic error: cannot open source file "/usr/local/cuda/include/math_functions.h"

1 catastrophic error detected in the compilation of "best_local_affine_kernel.cu".
Compilation terminated

my cuda path has changed, but in line 336, in smooth_local_affine ptx = program.compile(['-I/usr/local/cuda/include']) it doesn't read the CUDA_PATH variable.

I meet this problem too, could you tell me how to address the problem if you know the answer? thanks!

I meet this problem too, could you tell me how to address the problem if you know the answer? thanks!

just change the location to your cuda/include path in line 336

I had changed the code in line 336,like this:
ptx = program.compile(['-I/usr/local/cuda-env/cuda-9.1/include'])
I also set the CUDA_PATH and C_INCLUDE_PATH in .bashrc. However, it still occurs error
pynvrtc.compiler.ProgramException: best_local_affine_kernel.cu(2): catastrophic error: cannot open source file "/usr/local/cuda/include/math_functions.h. I don't know why use this path.
Could you tell me how to fix it. thx.
@in3omnia

I had changed the code in line 336,like this:
ptx = program.compile(['-I/usr/local/cuda-env/cuda-9.1/include'])
I also set the CUDA_PATH and C_INCLUDE_PATH in .bashrc. However, it still occurs error
pynvrtc.compiler.ProgramException: best_local_affine_kernel.cu(2): catastrophic error: cannot open source file "/usr/local/cuda/include/math_functions.h. I don't know why use this path.
Could you tell me how to fix it. thx.
@in3omnia

Maybe you also need to change line 6 #include "/usr/local/cuda/include/math_functions.h" to your path.

Any suggestions on getting this to work with a conda install of cuda?

Same question as Nicholas. How to make it work using anaconda's cuda?

First of all find math_funtions.h file in your system.
and perform some change in smooth_filter.py at line number 6.
#include "New Path"

example :
before #include "/usr/local/cuda/include/math_functions.h"
after #include "/usr/include/math_functions.h"
and run again

Any suggestions on getting this to work with a conda install of cuda?

Same Problem. Have you got a solution?