Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
37 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
1 Reply
Highlighted
Moderator
21 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