error: cannot open source file "/usr/local/cuda/include/math_functions.h"
Author: in3omniaCreated Mar 26, 2019Updated Feb 20, 2021
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 terminatedmy 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.
Source: NVIDIA/FastPhotoStyle