Skip to content

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

Description

@in3omnia
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.

Activity

  1. YanLiang0813 commented on Apr 9, 2019

    @YanLiang0813

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

  2. in3omnia commented on Apr 15, 2019

    @in3omnia
    Author

    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

  3. Seanseattle commented on May 15, 2019

    @Seanseattle

    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

  4. in3omnia commented on Jun 20, 2019

    @in3omnia
    Author

    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.

  5. NicholasMcCarthy commented on Jul 26, 2019

    @NicholasMcCarthy

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

  6. DaddyWesker commented on Aug 22, 2019

    @DaddyWesker

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

  7. dhanpalrajpurohit commented on Sep 13, 2019

    @dhanpalrajpurohit

    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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions