- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When I tried to migrate a cuda source code, I got the below warnings
warning: DPCT1007:3: Migration of this CUDA API is not supported by the Intel(R) DPC++ Compatibility Tool.
cuDeviceGet()
cuDeviceGetName()
cuDeviceGetAttribute()
cuDeviceGetAttribute()
cuCtxCreate()
Is there any dpc++ equivalent APIs for the above cuda APIs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Your issue got fixed in Intel one API 2021.3. Could you please try this version and let us know if you face any further issues.
Thanks & Regards
Shivani
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
Thanks for reaching out to us.
Please refer to the below equivalent dpc++ API.
- cudaGetDeviceCount you can use dpct::dev_mgr::instance().device_count();
- cuDeviceGet you can use dpct::dev_mgr::instance().get_device(<id>)
- cuDeviceGetName you can use queue.get_device().get_info<sycl::info::device::name>()
- cuDeviceGetAttributes you can use dpct::dev_mgr::instance().get_device(<id>).get_device_info(dpct::device_info)
- cuCtxCreate you can use context class
For all the above-mentioned equivalent dpc++/dpct functions there might be some other alternate function depending upon the user.
I Hope, the above information will help you.
Warm Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please give us an update if the provided details helped you and let us know if you have any other issues related to this thread.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for the information given.
As the No. of arguments and syntax differ for cuda APIs & their equivalent sycl APIs that have been provided earlier in previous reply, I have problem in replacing the cuda APIs with their equivalent sycl APIs in migrated code.
So, can you please help me how to move forward by providing detailed documentation of replacing the cuda APIs with their equivalent sycl APIs in migrated code.
Thanks & Regards
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As of now, there is very small documentation. So for the detailed documentation, we forwarding this issue to the concerned team.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DPCT tool is improving for each release. Please make sure to install the latest.
I've filed a jira CTST-1346 to track the "cuDeviceGetName", other APIs should be supported in the next release.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Your issue got fixed in Intel one API 2021.3. Could you please try this version and let us know if you face any further issues.
Thanks & Regards
Shivani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried migrating a CUDA application to DPC++ using DPCT tool of latest oneAPI 2021.3 and it completely migrated without any errors. Thanks for tracking my issue and since my issue has been resolved you can close this issue.
Thanks,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for accepting as a solution. As your issue has been resolved, we will no longer respond to this thread. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Have a Good day!
Thanks & Regards
Shivani

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page