[all-commits] [llvm/llvm-project] b5571b: [MLIR][OpenMP] LLVM IR translation of host_eval
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Fri Nov 15 08:27:46 PST 2024
Branch: refs/heads/users/skatrak/host-eval-05-mlir-llvmir-generic
Home: https://github.com/llvm/llvm-project
Commit: b5571bed993b32eadcc7f80f110bfe73438bd1f9
https://github.com/llvm/llvm-project/commit/b5571bed993b32eadcc7f80f110bfe73438bd1f9
Author: Sergio Afonso <safonsof at amd.com>
Date: 2024-11-15 (Fri, 15 Nov 2024)
Changed paths:
M flang/test/Integration/OpenMP/target-filtering.f90
M flang/test/Lower/OpenMP/function-filtering-2.f90
M flang/test/Lower/OpenMP/function-filtering-3.f90
M flang/test/Lower/OpenMP/function-filtering.f90
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/test/Target/LLVMIR/omptarget-byref-bycopy-generation-device.mlir
M mlir/test/Target/LLVMIR/omptarget-constant-alloca-raise.mlir
M mlir/test/Target/LLVMIR/omptarget-constant-indexing-device-region.mlir
M mlir/test/Target/LLVMIR/omptarget-debug.mlir
M mlir/test/Target/LLVMIR/omptarget-declare-target-llvm-device.mlir
M mlir/test/Target/LLVMIR/omptarget-parallel-llvm.mlir
M mlir/test/Target/LLVMIR/omptarget-region-device-llvm.mlir
M mlir/test/Target/LLVMIR/omptarget-target-inside-task.mlir
A mlir/test/Target/LLVMIR/openmp-target-launch-device.mlir
A mlir/test/Target/LLVMIR/openmp-target-launch-host.mlir
M mlir/test/Target/LLVMIR/openmp-target-use-device-nested.mlir
M mlir/test/Target/LLVMIR/openmp-task-target-device.mlir
M mlir/test/Target/LLVMIR/openmp-todo.mlir
Log Message:
-----------
[MLIR][OpenMP] LLVM IR translation of host_eval
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.
Support for evaluating the collapsed loop trip count of target SPMD kernels
remains unsupported.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list