mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 08:26:07 +00:00

This allows purging references of scf.ForeachThreadOp and scf.PerformConcurrentlyOp from ParallelInsertSliceOp. This will allowmoving the op closer to tensor::InsertSliceOp with which it should share much more code. In the future, the decoupling will also allow extending the type of ops that can be used in the parallel combinator as well as semantics related to multiple concurrent inserts to the same result. Differential Revision: https://reviews.llvm.org/D128857
28 lines
1.1 KiB
C++
28 lines
1.1 KiB
C++
//===- ParallelCombiningOpInterface.cpp - Parallel combining op interface -===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "mlir/Interfaces/ParallelCombiningOpInterface.h"
|
|
|
|
using namespace mlir;
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// ParallelCombiningOpInterface
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// TODO: Single region single block interface on interfaces ?
|
|
LogicalResult mlir::detail::verifyParallelCombiningOpInterface(Operation *op) {
|
|
if (op->getNumRegions() != 1)
|
|
return op->emitError("expected single region op");
|
|
if (!op->getRegion(0).hasOneBlock())
|
|
return op->emitError("expected single block op region");
|
|
return success();
|
|
}
|
|
|
|
/// Include the definitions of the interface.
|
|
#include "mlir/Interfaces/ParallelCombiningOpInterface.cpp.inc"
|