Skip to content
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

Merged
merged 5 commits into from Dec 19, 2019

Conversation

DrTodd13
Copy link
Collaborator

@DrTodd13 DrTodd13 commented Dec 7, 2019

Resolves #4922

…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 +
Copy link
Member

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.

@sklam sklam added 4 - Waiting on author Waiting for author to respond to review and removed 3 - Ready for Review labels Dec 18, 2019
@stuartarchibald
Copy link
Contributor

@DrTodd13 IntelLabs#66 fixes #4935 (comment)

Copy link
Contributor

@stuartarchibald stuartarchibald left a 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.

@stuartarchibald stuartarchibald added 4 - Waiting on CI Review etc done, waiting for CI to finish and removed 4 - Waiting on author Waiting for author to respond to review labels Dec 19, 2019
@seibert
Copy link
Contributor

seibert commented Dec 19, 2019

CI passed, ready to merge

@seibert seibert added 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on CI Review etc done, waiting for CI to finish labels Dec 19, 2019
@seibert seibert merged commit aa17bb1 into numba:master Dec 19, 2019
stuartarchibald added a commit to stuartarchibald/numba that referenced this pull request Dec 19, 2019
@DrTodd13 DrTodd13 deleted the issue4922 branch January 16, 2020 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to merge Review and testing done, is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prange reduction incorrect when operation happens inside a conditional block
4 participants