Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
138 Views

dpct not converting a header file (properly)

Hi,

Can I convert header files using dpct if they contain cuda code? If yes then I am facing following issue:

I was trying to convert device/tensor_foreach.h from cutlass repo. There is another file with the same name in /device/kernel folder. dpct was only converting /device/kernel/tensor_foreach.h file and not /device/tensor_foreach.h file. 

Command: 

cutlass\tools\util\include\cutlass\util\reference\device>dpct --cuda-include-path="C:\nvcc\include" --extra-arg="-I../../../../../../../include/" --extra-arg="-I../../../../../../../tools/util/include" --out-root=dpct tensor_foreach.h

Finally I renamed /device/tensor_foreach.h to /device/tensor_foreach.cu and it generated tensor_foreach.dp.cpp but it did not convert any of cuda kernel calls. Look at line nos: 64, 84 & 122 in the attached file.

Regards,
Gagan

 

Tags (1)
0 Kudos
3 Replies
Highlighted
Moderator
130 Views

Hi Gagan,

 

Kindly upgrade the oneAPI basetoolkit to the latest beta07 build if not done already and execute this command:

 

dpct tensor_foreach.h --extra-arg="-I../../../../../../../include/" --extra-arg="-I../../../../../../../tools/util/include" --extra-arg="-std=c++11" --keep-original-code 

 

 

Executing the above command produces migrated files in dpct_output directory and I did not observe any issues on the line numbers that you have mentioned. The CUDA kernel calls are correctly migrated to its DPC++ equivalent.

 

Link to download oneAPI base toolkit beta 07: https://software.intel.com/content/www/us/en/develop/tools/oneapi/download.html#basekit

 

Let me know if you face any issues.

 

Regards,

Rahul

 

0 Kudos
Highlighted
Moderator
112 Views

Hi Gagan,


Could you kindly confirm if the solution provided helped?


Thanks,

Rahul


0 Kudos
Highlighted
Moderator
88 Views

Intel will no longer monitor this thread. However, this thread will remain open for community discussion. If you still have any issue, feel free to post a new question.


0 Kudos