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
Better handling of prange with multiple reductions on the same variable. #4935
Conversation
…an assignment with a left-hand side to the reduction variable's name. This fixes problems with cases where there are multiple assignments to the reduction variable in the parfor.
… another test I thought of for where the same reduction variable is used twice but with different operators.
… reduction statements with different/conflicting operators.
numba/parfor.py
Outdated
first_red_func = node.value.fn | ||
else: | ||
if first_red_func != node.value.fn: | ||
raise ValueError("Reduction variable " + param + |
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.
I think it'd be better to raise an numba.errors.UnsupportedError
with loc
set to something like node.loc
.
As title.
Fix up error class and 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.
Thanks for the patch.
CI passed, ready to merge |
As title. numba#4922 was fixed by numba#4935.
Resolves #4922