Removed SpatNopPattern
All checks were successful
Validate Operations / validate-operations (push) Successful in 22m36s
All checks were successful
Validate Operations / validate-operations (push) Successful in 22m36s
This commit is contained in:
@@ -23,15 +23,6 @@ using namespace mlir;
|
|||||||
namespace onnx_mlir {
|
namespace onnx_mlir {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
struct EraseSpatNopPattern : public mlir::OpRewritePattern<spatial::SpatNopOp> {
|
|
||||||
using OpRewritePattern<spatial::SpatNopOp>::OpRewritePattern;
|
|
||||||
mlir::LogicalResult matchAndRewrite(spatial::SpatNopOp op,
|
|
||||||
mlir::PatternRewriter &rewriter) const override {
|
|
||||||
rewriter.eraseOp(op);
|
|
||||||
return mlir::success();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static std::optional<unsigned> getDirectComputeInputIndex(Operation* owner, unsigned operandNumber) {
|
static std::optional<unsigned> getDirectComputeInputIndex(Operation* owner, unsigned operandNumber) {
|
||||||
if (auto compute = dyn_cast<spatial::SpatCompute>(owner)) {
|
if (auto compute = dyn_cast<spatial::SpatCompute>(owner)) {
|
||||||
@@ -426,7 +417,7 @@ struct FuncOpArgToGlobalMemoryPattern final : OpRewritePattern<mlir::func::FuncO
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
void populateGlobalTensorToMemrefPatterns(RewritePatternSet& patterns) {
|
void populateGlobalTensorToMemrefPatterns(RewritePatternSet& patterns) {
|
||||||
patterns.add<EraseSpatNopPattern, MoveExtractSliceIntoCompute, FuncOpArgToGlobalMemoryPattern, ArithConstToGlobalMemoryPattern>(
|
patterns.add<MoveExtractSliceIntoCompute, FuncOpArgToGlobalMemoryPattern, ArithConstToGlobalMemoryPattern>(
|
||||||
patterns.getContext());
|
patterns.getContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user