Migrating to SYCL
One-stop forum for getting assistance migrating your existing code to SYCL
45 Discussions

DPCT use in cuda header files (.cuh).

MountainLogic
Beginner
2,650 Views

What is the correct way to handle #include xxx.cuh file from a cuda kernel with the DPCT tool?

 

I have a single kernel.cu file that I a porting to sycl using DPCT that has a cuda include file, kernel.cuh.  I seem to be getting a correct port, except the kernal.dp.cpp file keeps the "#include kernel.cuh"  

 

I also seem to be having a problem with device constants such as 

__device__ __constant__ int d_foo;
__device__ __constant__ float d_bar;
 
these see to be ignored by DCPT
0 Kudos
3 Replies
NoorjahanSk_Intel
Moderator
2,608 Views

Hi,

Thanks for reaching out to us.

 

>>What is the correct way to handle #include xxx.cuh file from a cuda kernel with the DPCT tool?

 Header files which are located in same directory of source files are migratable when specified by --in-root.

 We can also use --extra-arg flag which is used to include header files explicitly.

 For more details you can refer below link:

 https://software.intel.com/content/www/us/en/develop/documentation/intel-dpcpp-compatibility-tool-user-guide/top/migrate-a-project/migrate-a-project-on-linux.html

>> problem with device constants

Please try above methods during migration of header files(.cuh), if the issue still persists please provide us a sample reproducer and steps you have followed to migrate.

 

Thanks & Regards

Noorjahan.

 

0 Kudos
NoorjahanSk_Intel
Moderator
2,556 Views

Hi,

 Has the information provided helped? If not, then could you please provide the above-mentioned details.

 

Thanks & Regards

Noorjahan.

 

0 Kudos
NoorjahanSk_Intel
Moderator
2,523 Views

Hi,

I have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question

 

Thanks & Regards

Noorjahan.

 

0 Kudos
Reply