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.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
358 Discussions

DPCT doesn't support migration of these APIs

_Santosh_
Beginner
1,496 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,127 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

8 Replies
AbhishekD_Intel
Moderator
1,480 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


AbhishekD_Intel
Moderator
1,444 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


_Santosh_
Beginner
1,437 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

AbhishekD_Intel
Moderator
1,417 Views

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


Thank You


JenniferJ
Moderator
1,279 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!


ShivaniK_Intel
Moderator
1,128 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


_Santosh_
Beginner
1,105 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

ShivaniK_Intel
Moderator
1,090 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

 

Reply