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
Fix #5570. Incorrect race variable detection due to SSA naming. #5630
Conversation
…ned names in parfors params.
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. Few minor things to address else looks good.
except ir.NotDefinedError: | ||
# XXX: it's a bug that something references an undefined name |
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.
Should this actually just raise?
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.
No, some passes are not registering names into scope. There are other similar situation where we just ignore the NotDefinedError
in parfor passes
numba/parfors/parfor.py
Outdated
# XXX: it's a bug that something references an undefined name | ||
return k | ||
|
||
keep = set(races) |
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.
Perhaps s/keep/races1/
so as to match up with the docstring?
numba/parfors/parfor.py
Outdated
|
||
keep = set(races) | ||
for rv in races: | ||
if any(unversion(rv) == unversion(pv) for pv in params): |
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 the unversion(pv) for pv in params
be hoisted as loop invariant?
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 and fix-ups, looks good.
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Fix #5570. Incorrect race variable detection due to SSA naming.
Fixes #5570