Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: "-I option" to add search include folders #1882

Open
oscarbg opened this issue Apr 15, 2024 · 1 comment
Open

Request: "-I option" to add search include folders #1882

oscarbg opened this issue Apr 15, 2024 · 1 comment

Comments

@oscarbg
Copy link

oscarbg commented Apr 15, 2024

Hi,
HIPIFY includes it.. and don't know how to handle it..
all/lots of samples from CUDA SDK make use of headers:

// helper functions and utilities to work with CUDA
#include <helper_cuda.h>
#include <helper_functions.h>

dpct graphMemoryFootprint.cu

and not being able to add a search path fail with:

NOTE: Could not auto-detect compilation database for file 'graphMemoryFootprint.cu' in 'C:\Users\oqui\Downloads\dpct_win_release\bin' or any parent directory.
The directory "dpct_output" is used as "out-root"
warning: CUDA version is newer than the latest supported version 12.3 [-Wunknown-cuda-version]
Parsing: C:\Users\oqui\Downloads\dpct_win_release\bin\graphMemoryFootprint.cu
C:\Users\oqui\Downloads\dpct_win_release\bin\graphMemoryFootprint.cu:33:10: fatal error: 'helper_cuda.h' file not found
   33 | #include <helper_cuda.h>
@tomflinda
Copy link
Contributor

tomflinda commented Apr 16, 2024

@oscarbg you should specify the option -in-root correctly, here is an example:

git clone https://github.com/NVIDIA/cuda-samples.git
cd cuda-samples\Samples\0_Introduction\vectorAdd
dpct -in-root ../../ -out-root out dpct --vcxprojfile=vectorAdd_vs2019.vcxproj --cuda-include-path=/path/to/header file/include/

BTW, -in-root is used to specify the directory path for the root of the source tree that needs to be migrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants