[all-commits] [llvm/llvm-project] 9cf700: [MLIR][OpenMP] LLVM IR translation of host_eval
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Thu Jan 9 05:18:54 PST 2025
Branch: refs/heads/users/skatrak/host-eval-05-mlir-llvmir-generic
Home: https://github.com/llvm/llvm-project
Commit: 9cf700147b302de9bb9fc5ec1453aa660ecb8411
https://github.com/llvm/llvm-project/commit/9cf700147b302de9bb9fc5ec1453aa660ecb8411
Author: Sergio Afonso <safonsof at amd.com>
Date: 2025-01-09 (Thu, 09 Jan 2025)
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
M mlir/test/Target/LLVMIR/omptarget-threadprivate-device-lowering.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.
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