- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- dpct
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gagan,
Could you kindly confirm if the solution provided helped?
Thanks,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page