Skip to content

[GPU] Fix OCL kernel builder error handling#35107

Merged
jkasprza merged 5 commits intoopenvinotoolkit:masterfrom
jkasprza:fix_kernel_builder_error_handling
Apr 2, 2026
Merged

[GPU] Fix OCL kernel builder error handling#35107
jkasprza merged 5 commits intoopenvinotoolkit:masterfrom
jkasprza:fix_kernel_builder_error_handling

Conversation

@jkasprza
Copy link
Copy Markdown
Contributor

@jkasprza jkasprza commented Apr 1, 2026

Details:

  • CL_HPP_ENABLE_EXCEPTIONS macro causes OpenCL C++ bindings API to throw exceptions instead of returning error values. Because of this we should use try&catch to handle possible errors.

Tickets:

  • ...

AI Assistance:

  • AI assistance used: no

@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Apr 1, 2026
@jkasprza jkasprza changed the title Fix ocl_kernel_builder error handling [GPU] Fix OCL kernel builder error handling Apr 1, 2026
@jkasprza jkasprza marked this pull request as ready for review April 1, 2026 11:05
@jkasprza jkasprza requested review from a team as code owners April 1, 2026 11:05
@jkasprza jkasprza requested review from isanghao and p-durandin April 1, 2026 11:05
@p-durandin p-durandin added this to the 2026.2 milestone Apr 1, 2026
Copy link
Copy Markdown
Contributor

@pkowalc1 pkowalc1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, I would personally add a macro to make ignoring ret val even more explicit plus I would consider adding catch(...) just in case ocl exception api will be changed in the future. But overall it is ok IMO.

@jkasprza jkasprza added this pull request to the merge queue Apr 2, 2026
Merged via the queue into openvinotoolkit:master with commit f85d7b3 Apr 2, 2026
188 checks passed
@jkasprza jkasprza deleted the fix_kernel_builder_error_handling branch April 2, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: GPU OpenVINO GPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants