[all-commits] [llvm/llvm-project] 3c3947: [MLIR][OpenMP] Support allocations of device share...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Mon Apr 27 05:08:35 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3c39478e8b0b6d0e91a70c5887ea27ac90c2ed8c
https://github.com/llvm/llvm-project/commit/3c39478e8b0b6d0e91a70c5887ea27ac90c2ed8c
Author: Sergio Afonso <safonsof at amd.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
A mlir/test/Target/LLVMIR/omptarget-device-shared-memory.mlir
Log Message:
-----------
[MLIR][OpenMP] Support allocations of device shared memory (#150924)
This patch updates the allocation of some reduction and private
variables within target regions to use device shared memory rather than
private memory. This is a prerequisite to produce working Generic
kernels containing parallel regions.
In particular, the following situations result in the usage of device
shared memory (only when compiling for the target device if they are
placed inside of a target region representing a Generic kernel):
- Reduction variables on `teams` constructs.
- Private variables on `teams` and `distribute` constructs that are
reduced or used inside of a `parallel` region.
Currently, there is no support for delayed privatization on `teams`
constructs, so private variables on these constructs won't currently be
affected. When support is added, if it uses the existing
`allocatePrivateVars` and `cleanupPrivateVars` functions, usage of
device shared memory will be introduced automatically.
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