forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flang][MLIR][OpenMP] Fix num_teams, num_threads, thread_limit loweri…
…ng (#132) * [Flang][MLIR][OpenMP] Fix num_teams, num_threads, thread_limit lowering This patch fixes lowering for the num_teams, num_threads and thread_limit clauses when inside of a target region and compiling for the host device. The current approach requires these to be attached to the parent MLIR omp.target operation. However, some incorrect checks based on the `evalHasSiblings()` helper function would result in these clauses being attached to the `omp.teams` or `omp.parallel` operation instead, triggering a verifier error. In this patch, these checks are updated to stop breaking when lowering combined `target teams [X]` constructs. Also, the `genTeamsClauses()` function is fixed to avoid processing num_teams and thread_limit twice, which probably resulted from a recent merge. Related op verifier checks are relaxed due to the difficulty of checking for the proper conditions to be met. It is left to the MLIR creator to decide where these clauses are attached and processed.
- Loading branch information
Showing
3 changed files
with
266 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.