Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*

try catch can be expensive

Guracar__Ismayil
Beginner
1,257 Views

Hi 

When I run the DPC++ compatibility tool on CUDA code I see that every one of my kernel launches in the generated cpp code is bracketed by a try-catch construct.  It has been my experience that 'try' can be expensive in execution time (as well the experience of others, e.g. https://stackoverflow.com/questions/52312/what-is-the-real-overhead-of-try-catch-in-c).  Is there a way to disable or consolidate the try-catch so that it doesn't occur at each kernel launch but perhaps after a block of launches.  We might lose the ability to isolate errors to a particular launch, but that might be a reasonable tradeoff for performance in situations where large numbers of kernels must be launched.

Thanks

Ismayil

0 Kudos
3 Replies
AnubhavJ_intel
Employee
1,257 Views

Hi,

Thanks for reaching out to us. We will get back to you soon.

0 Kudos
Varsha_M_Intel
Employee
1,257 Views

Hi Ismayil,

After migration to DPCPP, the user is required to review, complete, test and fine tune and optimize(as you may see fit) the output of the tool.

-Varsha

0 Kudos
AbhishekD_Intel
Moderator
1,062 Views

Hi,

 

As we haven't heard back from you, we are considering that your issue has been resolved.

We will no longer monitor this thread. If you require any additional assistance from Intel, please start a new thread.

Any further interaction in this thread will be considered community only.



Warm Regards,

Abhishek


0 Kudos
Reply