aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSergio Afonso <safonsof@amd.com>2025-01-14 13:07:38 +0000
committerGitHub <noreply@github.com>2025-01-14 13:07:38 +0000
commitd2d4c3bd598453a1d871096466953ec25483034f (patch)
treea1b2d0b7106c369d3fa50196395d8ff265689034 /flang/lib/Frontend/CompilerInvocation.cpp
parent0d71b3e4031e7b18a5947bdea076839e5a56d202 (diff)
downloadllvm-d2d4c3bd598453a1d871096466953ec25483034f.zip
llvm-d2d4c3bd598453a1d871096466953ec25483034f.tar.gz
llvm-d2d4c3bd598453a1d871096466953ec25483034f.tar.bz2
[MLIR][OpenMP] LLVM IR translation of host_eval (#116052)
This patch adds support for processing the `host_eval` clause of `omp.target` to populate default and runtime kernel launch attributes. Specifically, these related to the `num_teams`, `thread_limit` and `num_threads` clauses attached to operations nested inside of `omp.target`. As a result, the `thread_limit` clause of `omp.target` is also supported. The implementation of `initTargetDefaultAttrs()` is intended to reflect clang's own processing of multiple constructs and clauses in order to define a default number of teams and threads to be used as kernel attributes and to populate global variables in the target device module. One side effect of this change is that it is no longer possible to translate to LLVM IR target device MLIR modules unless they have a supported target triple. This is because the local `getGridValue()` function in the `OpenMPIRBuilder` only works for certain architectures, and it is called whenever the maximum number of threads has not been explicitly defined. This limitation also matches clang. Evaluating the collapsed loop trip count of SPMD and Generic-SPMD kernels remains unsupported.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions