-
-
Notifications
You must be signed in to change notification settings - Fork 955
Support for break and continue keywords #8010
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
y[:mask] += 1 | ||
assert bool((x == y).all()) | ||
|
||
def test_break_and_continue(): |
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.
Could you split the 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.
Sure thing, ill push the change in a few hours when I'm back
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.
Tests are split, also added a non-static break/continue condition to each just in case the compiler can optimize static ones away.
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.
LGTM excepts the comment.
Co-authored-by: Akifumi Imanishi <[email protected]>
Co-authored-by: Akifumi Imanishi <[email protected]>
/test mini |
My bad, I still don't have a proper testing env set up yet, so the copied over tests didn't have the "self" parameter. Should work now |
/test mini |
/test mini |
/test mini |
@Zhyrek LGTM! Thanks for your contribution! |
Allows functions with "break" and "continue" keywords to be compiled by @jit.rawkernel
Added a test to cupy/tests/cupyx_tests/jit_tests/test_raw.py for both keywords, in both for and while loops.