Community
cancel
Showing results for 
Search instead for 
Did you mean: 
_Santosh_
Beginner
297 Views

DPCT doesn't support migration of these APIs

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
5 Replies
AbhishekD_Intel
Moderator
281 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
245 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
237 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
218 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
78 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!


Reply