- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The below piece of code from a oneAPI program is giving an error.
if (e.get_cl_code() == CL_DEVICE_NOT_FOUND) {
std::cout << "If you are targeting an FPGA, ensure that your "
src/split/hough_transform_kernel.cpp:75:15: warning: 'get_cl_code' is deprecated: use sycl::exception.code() instead. [-Wdeprecated-declarations] if (e.get_cl_code() == CL_DEVICE_NOT_FOUND) { ^
As suggested in the error, tried using sycl::exception.code() instead:
if (sycl::exception.code() == CL_DEVICE_NOT_FOUND) {
std::cout << "If you are targeting an FPGA, ensure that your "
But that gives the following error:
src/split/hough_transform_kernel.cpp:75:28: error: cannot use dot operator on a type if (sycl::exception.code() == CL_DEVICE_NOT_FOUND) { ^
Please let me know what is the correct usage here.
Further referring to the first error, it states ''get_cl_code' is deprecated', but the sycl specification from this link https://sycl.readthedocs.io/en/latest/iface/exception.html shows 'get_cl_code' is still supported. So please clarify where I can find the updated sycl spec for this error.
Thanks,
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
Please try using the below code snippet as we are getting the expected results without any errors.
catch(sycl::exception const& e) {
if (e.code().value() == CL_DEVICE_NOT_FOUND) {
Could you please try and let us know if you are still facing any issues? Please provide us with a sample reproducer code if the provided code snippet does not work.
Thanks & Regards,
Varsha
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
Please try using the below code snippet as we are getting the expected results without any errors.
catch(sycl::exception const& e) {
if (e.code().value() == CL_DEVICE_NOT_FOUND) {
Could you please try and let us know if you are still facing any issues? Please provide us with a sample reproducer code if the provided code snippet does not work.
Thanks & Regards,
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Glad to know that your issue is resolved. Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Varsha
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page