Skip to content

Commit 0586e88

Browse files
committed
[MLIR][OpenMP] Support allocations of device shared memory
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.
1 parent f27aedb commit 0586e88

File tree

2 files changed

+253
-60
lines changed

2 files changed

+253
-60
lines changed

0 commit comments

Comments
 (0)