- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This screenshot is taken from Intel oneAPI Programming Guide(pg 44).
According to the documentation, printf can be used inside the kernel code for debugging.
But when I used inside my kernel code, it shows an error 'sycl kernel cannot call undefined function'.
q.submit([&](sycl::handler& h){
h.single_task([=]() {
printf
});
});
Appreciate your help.
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's because you are not calling the function with right syntax. printf(...) is in cl::sycl::ext::oneapi::experimental namespace, you need to specify a namespace for an external function. I would recommend using sycl::stream for the ease of use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Could you please provide any updates on your issue?
Thanks & Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Hemanth

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page