Intel® oneAPI Base Toolkit
Support for the core tools and libraries within the base toolkit that are used to build and deploy high-performance data-centric applications.
417 Discussions

DPCT doesn't support migration of these APIs

_Santosh_
Beginner
2,112 Views

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?

 

0 Kudos
1 Solution
ShivaniK_Intel
Moderator
1,743 Views

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


View solution in original post

0 Kudos
8 Replies
AbhishekD_Intel
Moderator
2,096 Views

Hi Santosh,


Thanks for reaching out to us.

Please refer to the below equivalent dpc++ API.

  1. cudaGetDeviceCount you can use dpct::dev_mgr::instance().device_count();
  2. cuDeviceGet you can use dpct::dev_mgr::instance().get_device(<id>)
  3. cuDeviceGetName you can use queue.get_device().get_info<sycl::info::device::name>()
  4. cuDeviceGetAttributes you can use dpct::dev_mgr::instance().get_device(<id>).get_device_info(dpct::device_info)
  5. 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


0 Kudos
AbhishekD_Intel
Moderator
2,060 Views

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


0 Kudos
_Santosh_
Beginner
2,053 Views

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

0 Kudos
AbhishekD_Intel
Moderator
2,033 Views

As of now, there is very small documentation. So for the detailed documentation, we forwarding this issue to the concerned team.


Thank You


0 Kudos
JenniferJ
Moderator
1,895 Views

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!


0 Kudos
ShivaniK_Intel
Moderator
1,744 Views

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


0 Kudos
_Santosh_
Beginner
1,721 Views

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

0 Kudos
ShivaniK_Intel
Moderator
1,706 Views

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

 

0 Kudos
Reply