-
Notifications
You must be signed in to change notification settings - Fork 28
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
#2723 Add some support for dependency analysis involving array ranges. #2880
#2723 Add some support for dependency analysis involving array ranges. #2880
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2880 +/- ##
=======================================
Coverage 99.89% 99.89%
=======================================
Files 359 359
Lines 50997 51011 +14
=======================================
+ Hits 50942 50956 +14
Misses 55 55 ☔ View full report in Codecov by Sentry. |
CI was green. Note that I have some typos in the issue number - I mixed up 2878 and 2723, so e.g. the CI shows 2878, not 2723 :( |
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 to tackling this @hiker, the implementation, docstring and tests all look great. The only comment I have is that when looking for TODOs in the same file I found a reference to #2168 (L401) which I am wondering if it's the same issue and can now also be fixed/closed. But I will approve regardless. Let me know what you think.
I had a look. That issue is concerned about array-ranges that involve the loop variable that is to be parallelised, e.g.:
(stupid example, but you get the idea). The moment the loop variable is involved, this new range comparison is not called at all. I looked if we could simply call this new function here: Now we could do a similar test to the rest of 'one index that depends on the loop That leads to a systems of inequalities (I hope that's the right word), which simplifies to: So, #2168 is not fixed here. But if you agree that array ranges depending on loop indices do not happen in any realistic code we need to handle (or will in general be not parallelisable anyway, so the current behaviour of rejecting it is good enough), we can close #2168, and replace the #TODO with just a comment for 'the future in case we need to look at it again'? |
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.
@hiker I am ok with keeping the issue, I just wanted to check if it was something easy to solve with the new functionality but I agree is not. This was my only comment, this is ready to merge.
Fixes #2723. I am not sure if more support is needed or would be useful (e.g. I could check if two ranges have the same stride, but accesses different elements, ...).