-
Notifications
You must be signed in to change notification settings - Fork 55
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
[flang][OpenMP] Handle non-const bounds in do concurrent
host mapping
#113
Conversation
Ping 🔔! Please take a look and let me know if you have any concerns or comments. |
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 don't see any code handling non-rectangular loop nests of nested DO CONCURRENT. What happens here?
do concurrent(i=1:n)
do concurrent(j=i:n)
end do
end do
Thanks for the review @Meinersbur 🙏!
I added an item to the |
do concurrent
mappingdo concurrent
**host** mapping
do concurrent
**host** mappingdo concurrent
host mapping
do concurrent
host mappingdo concurrent
__host__ mapping
do concurrent
__host__ mappingdo concurrent
host mapping
Lifts a restriction we had so far for `do concurrent` -> OpenMP mapping by supporting non-const bounds in loop headers.
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 added an item to the Next steps section in the document. Since we don't need that now for the somewhat big application we are valiating (LBL's inference engine), I think it makes sense to leave this as a TODO for (hopefully) near future.
I assume this means that with this patch applied, it will not try to convert both loops together (although I don't see where it is checking for this case, maybe on the MLIR side?).
Consider adding a test case that checks for non-rectangular loops. Maybe on the MLIR side, but if it becomes too complicated (e.g. involving Flang and MLIR, that would not be a unit test anymore), just leave it as-is.
With this patch applied, and the following example: do concurrent(i=1:n)
do concurrent(j=i:n)
...
end do
end do the pass will emit the following warning: warning: ...: Some `do concurent` loops are not perfectly-nested. These will be serialzied. The |
Lifts a restriction we had so far for
do concurrent
-> OpenMP mapping by supporting non-const bounds in loop headers.