You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error: cannot open source file "/usr/local/cuda/include/math_functions.h" #77
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 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.
Activity
YanLiang0813 commentedon Apr 9, 2019
I meet this problem too, could you tell me how to address the problem if you know the answer? thanks!
in3omnia commentedon Apr 15, 2019
just change the location to your
cuda/includepath inline 336Seanseattle commentedon May 15, 2019
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
in3omnia commentedon Jun 20, 2019
Maybe you also need to change line 6
#include "/usr/local/cuda/include/math_functions.h"to your path.NicholasMcCarthy commentedon Jul 26, 2019
Any suggestions on getting this to work with a conda install of cuda?
DaddyWesker commentedon Aug 22, 2019
Same question as Nicholas. How to make it work using anaconda's cuda?
dhanpalrajpurohit commentedon Sep 13, 2019
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