Intel® oneAPI Base Toolkit
Support for core tools and libraries to build and deploy high-performance data-centric applications
275 Discussions

DPCT doesn't support migration of these APIs

_Santosh_
Beginner
1,007 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
638 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
991 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
955 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
948 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
928 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
790 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
639 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
616 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
601 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