[Mlir-commits] [mlir] [MLIR][OpenMP] Fix standalone distribute on the device (PR #133094)
Sergio Afonso
llvmlistbot at llvm.org
Mon Mar 31 08:33:44 PDT 2025
================
@@ -2041,57 +2049,99 @@ TargetOp::getKernelExecFlags(Operation *capturedOp) {
(targetOp && targetOp.getInnermostCapturedOmpOp() == capturedOp)) &&
"unexpected captured op");
- // Make sure this region is capturing a loop. Otherwise, it's a generic
- // kernel.
+ // If it's not capturing a loop, it's a default target region.
if (!isa_and_present<LoopNestOp>(capturedOp))
- return OMP_TGT_EXEC_MODE_GENERIC;
+ return TargetRegionFlags::generic;
- SmallVector<LoopWrapperInterface> wrappers;
- cast<LoopNestOp>(capturedOp).gatherWrappers(wrappers);
- assert(!wrappers.empty());
+ auto getInnermostWrapper = [](LoopNestOp loopOp, int &numWrappers) {
----------------
skatrak wrote:
I just updated this to actually remove the function altogether. I created it when I was expecting to use it multiple times, but in the end it only was necessary in one spot.
https://github.com/llvm/llvm-project/pull/133094
More information about the Mlir-commits
mailing list