-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL] Avoid infinite loop when kernel fails to compile with memory error #18888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rror The runtime tries to build a kernel again if compilation fails. But if UR returns a memory error the attempt counter was not compared against the maximum number of attempts, so the compiler was continuously called and eventually the loop counter would have overflowed.
@VerenaBeckham is it possible to add a test that would fail without your patch and work after your patch? |
I'm not sure. Even if you could write a test that allocates so much memory that it runs out, this test might still pass on a different architecture with more memory. Or do you know of a way to mock up this error? |
I think a unit test with You can find examples if you grep |
Thanks for the hint! I have added a test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of nits related to LLVM Coding Style, otherwise LGTM.
Co-authored-by: Marcos Maronas <[email protected]>
Co-authored-by: Marcos Maronas <[email protected]>
If you're happy with this @maarquitos14 do you want to "approve the workflows" and kick off the testing? |
I'm sorry, I forgot to push my clang format fixes. 🤦 Fixed now. |
The runtime tries to build a kernel again if compilation fails. But if UR returns a memory error the attempt counter was not compared against the maximum number of attempts, so the compiler was continuously called and eventually the loop counter would have overflowed.