-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[OpenMP][MLIR] Add num_teams clause with dims modifier support #169883
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
base: main
Are you sure you want to change the base?
Conversation
| def OpenMP_UseDevicePtrClause : OpenMP_UseDevicePtrClauseSkip<>; | ||
|
|
||
| //===----------------------------------------------------------------------===// | ||
| // V6.2: Multidimensional `num_teams` clause with dims modifier |
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.
| // V6.2: Multidimensional `num_teams` clause with dims modifier | |
| // V6.1: Multidimensional `num_teams` clause with dims modifier |
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.
Updated.
| // If dims not specified but we have values, it's implicitly unidimensional | ||
| if (!dims.has_value() && values.size() != 1) { | ||
| return parser.emitError(parser.getCurrentLocation()) | ||
| << "expected 1 value without dims modifier, got " << values.size(); |
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.
| << "expected 1 value without dims modifier, got " << values.size(); | |
| << "expected 1 value without dims modifier, but got " << values.size() << " values"; |
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.
Updated. Thanks
| }]; | ||
| } | ||
|
|
||
| def OpenMP_NumTeamsMultiDimClause : OpenMP_NumTeamsMultiDimClauseSkip<>; |
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 be rather called modifier instead of clause? The clause still is num_threads, but the modifier is dims.
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.
Original design was to have a separate dims modifier(with dims and values args) class and then create num_teams and thread_limit clauses from it. But this leads to both clauses having the same argument names and when added to teams Op would create an issue.
So, now created just num_teams_multi_dim clause with arguments as num_teams_dims and num_teams_values.
Will remove the old num_teams clause and replace it with num_teams_multi_dim clause and move the name back to num_teams
This is WIP PR for support of openmp 6.2 feature
num_teamswith dims modifier.To not break the current code, named the clause as
num_teams_multi_dim. Will name it back to num_teams once the ompIRBuilder supports creatingteamswith dims modifier argument.