Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoBump] Merge with fixes of debdbeda (May 28, needs torch-mlir bump 53) (55) #315

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions mlir/include/mlir/Dialect/Arith/Transforms/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ namespace arith {
class WideIntEmulationConverter;
class NarrowTypeEmulationConverter;

/// Create a pass to bufferize arith.constant ops.
std::unique_ptr<Pass> createConstantBufferizePass(uint64_t alignment = 0);

/// Adds patterns to emulate wide Arith and Function ops over integer
/// types into supported ones. This is done by splitting original power-of-two
/// i2N integer types into two iN halves.
Expand Down
16 changes: 0 additions & 16 deletions mlir/include/mlir/Dialect/Arith/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,6 @@

include "mlir/Pass/PassBase.td"

def ArithBufferizePass : Pass<"arith-bufferize", "ModuleOp"> {
let summary = "Bufferize Arith dialect ops.";
let description = [{
This pass bufferizes arith dialect ops.

This pass needs to be a module pass because it inserts memref.global
ops into the module, which cannot be done safely from a function pass due to
multi-threading. Most other bufferization passes can run in parallel at
function granularity.
}];
let options = [
Option<"alignment", "alignment", "unsigned", /*default=*/"0",
"Create global memrefs with a specified alignment">,
];
}

def ArithExpandOpsPass : Pass<"arith-expand"> {
let summary = "Legalize Arith ops to be convertible to LLVM.";
let dependentDialects = ["vector::VectorDialect"];
Expand Down
3 changes: 0 additions & 3 deletions mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,6 @@ createPromoteBuffersToStackPass(std::function<bool(Value)> isSmallAlloc);
/// insert_slice ops.
std::unique_ptr<Pass> createEmptyTensorEliminationPass();

/// Create a pass that bufferizes ops from the bufferization dialect.
std::unique_ptr<Pass> createBufferizationBufferizePass();

//===----------------------------------------------------------------------===//
// Registration
//===----------------------------------------------------------------------===//
Expand Down
5 changes: 0 additions & 5 deletions mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,6 @@ def FinalizingBufferize : Pass<"finalizing-bufferize", "func::FuncOp"> {
let constructor = "mlir::bufferization::createFinalizingBufferizePass()";
}

def BufferizationBufferize : Pass<"bufferization-bufferize", "func::FuncOp"> {
let summary = "Bufferize the `bufferization` dialect";
let constructor = "mlir::bufferization::createBufferizationBufferizePass()";
}

def DropEquivalentBufferResults : Pass<"drop-equivalent-buffer-results", "ModuleOp"> {
let summary = "Remove MemRef return values that are equivalent to a bbArg";
let description = [{
Expand Down
4 changes: 0 additions & 4 deletions mlir/include/mlir/Dialect/Linalg/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ namespace func {
class FuncOp;
} // namespace func

namespace bufferization {
struct OneShotBufferizationOptions;
} // namespace bufferization

#define GEN_PASS_DECL
#include "mlir/Dialect/Linalg/Passes.h.inc" // IWYU pragma: keep

Expand Down
10 changes: 0 additions & 10 deletions mlir/include/mlir/Dialect/Linalg/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ def LinalgInlineScalarOperandsPass : Pass<"linalg-inline-scalar-operands"> {
];
}

def LinalgBufferizePass : Pass<"linalg-bufferize"> {
let summary = "Bufferize the linalg dialect";
let dependentDialects = [
"affine::AffineDialect",
"bufferization::BufferizationDialect",
"linalg::LinalgDialect",
"memref::MemRefDialect",
];
}

def LinalgGeneralizeNamedOpsPass : Pass<"linalg-generalize-named-ops"> {
let summary = "Convert named ops into generic ops";
let dependentDialects = ["linalg::LinalgDialect"];
Expand Down
7 changes: 0 additions & 7 deletions mlir/include/mlir/Dialect/Shape/Transforms/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ void populateShapeRewritePatterns(RewritePatternSet &patterns);
void populateRemoveShapeConstraintsPatterns(RewritePatternSet &patterns);
std::unique_ptr<OperationPass<func::FuncOp>> createRemoveShapeConstraintsPass();

// Bufferizes shape dialect ops.
//
// Note that most shape dialect ops must be converted to std before
// bufferization happens, as they are intended to be bufferized at the std
// level.
std::unique_ptr<OperationPass<func::FuncOp>> createShapeBufferizePass();

/// Outline the shape computation part by adding shape.func and populate
/// conrresponding mapping infomation into ShapeMappingAnalysis.
std::unique_ptr<OperationPass<ModuleOp>> createOutlineShapeComputationPass();
Expand Down
7 changes: 0 additions & 7 deletions mlir/include/mlir/Dialect/Shape/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,4 @@ def ShapeToShapeLowering : Pass<"shape-to-shape-lowering", "func::FuncOp"> {
let constructor = "mlir::createShapeToShapeLowering()";
}

// TODO: Generalize this to allow any type conversions desired.
def ShapeBufferize : Pass<"shape-bufferize", "func::FuncOp"> {
let summary = "Bufferize the shape dialect.";
let constructor = "mlir::createShapeBufferizePass()";
let dependentDialects = ["bufferization::BufferizationDialect",
"memref::MemRefDialect"];
}
#endif // MLIR_DIALECT_SHAPE_TRANSFORMS_PASSES
3 changes: 0 additions & 3 deletions mlir/include/mlir/Dialect/Tensor/Transforms/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ namespace tensor {
/// Creates an instance of the `tensor` subset folding pass.
std::unique_ptr<Pass> createFoldTensorSubsetOpsPass();

/// Creates an instance of the `tensor` dialect bufferization pass.
std::unique_ptr<Pass> createTensorBufferizePass();

//===----------------------------------------------------------------------===//
// Registration
//===----------------------------------------------------------------------===//
Expand Down
5 changes: 0 additions & 5 deletions mlir/include/mlir/Dialect/Tensor/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ def FoldTensorSubsetOps : Pass<"fold-tensor-subset-ops"> {
];
}

def TensorBufferize : Pass<"tensor-bufferize", "func::FuncOp"> {
let summary = "Bufferize the `tensor` dialect";
let constructor = "mlir::tensor::createTensorBufferizePass()";
}

#endif // MLIR_DIALECT_TENSOR_TRANSFORMS_PASSES
3 changes: 0 additions & 3 deletions mlir/include/mlir/Dialect/Vector/Transforms/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ namespace vector {
#define GEN_PASS_DECL
#include "mlir/Dialect/Vector/Transforms/Passes.h.inc"

/// Creates an instance of the `vector` dialect bufferization pass.
std::unique_ptr<Pass> createVectorBufferizePass();

/// Creates an instance of the `vector.mask` lowering pass.
std::unique_ptr<Pass> createLowerVectorMaskPass();

Expand Down
5 changes: 0 additions & 5 deletions mlir/include/mlir/Dialect/Vector/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@

include "mlir/Pass/PassBase.td"

def VectorBufferize : Pass<"vector-bufferize", "func::FuncOp"> {
let summary = "Bufferize Vector dialect ops";
let constructor = "mlir::vector::createVectorBufferizePass()";
}

def LowerVectorMaskPass : Pass<"lower-vector-mask", "func::FuncOp"> {
let summary = "Lower 'vector.mask' operations";
let constructor = "mlir::vector::createLowerVectorMaskPass()";
Expand Down
67 changes: 0 additions & 67 deletions mlir/lib/Dialect/Arith/Transforms/Bufferize.cpp

This file was deleted.

1 change: 0 additions & 1 deletion mlir/lib/Dialect/Arith/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
add_mlir_dialect_library(MLIRArithTransforms
BufferDeallocationOpInterfaceImpl.cpp
BufferizableOpInterfaceImpl.cpp
Bufferize.cpp
BufferViewFlowOpInterfaceImpl.cpp
EmulateUnsupportedFloats.cpp
EmulateWideInt.cpp
Expand Down
23 changes: 0 additions & 23 deletions mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,29 +321,6 @@ struct OneShotBufferizePass
};
} // namespace

namespace {
struct BufferizationBufferizePass
: public bufferization::impl::BufferizationBufferizeBase<
BufferizationBufferizePass> {
void runOnOperation() override {
BufferizationOptions options = getPartialBufferizationOptions();
options.opFilter.allowDialect<BufferizationDialect>();

if (failed(bufferizeOp(getOperation(), options)))
signalPassFailure();
}

void getDependentDialects(DialectRegistry &registry) const override {
registry
.insert<bufferization::BufferizationDialect, memref::MemRefDialect>();
}
};
} // namespace

std::unique_ptr<Pass> mlir::bufferization::createBufferizationBufferizePass() {
return std::make_unique<BufferizationBufferizePass>();
}

std::unique_ptr<Pass> mlir::bufferization::createOneShotBufferizePass() {
return std::make_unique<OneShotBufferizePass>();
}
Expand Down
52 changes: 0 additions & 52 deletions mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp

This file was deleted.

1 change: 0 additions & 1 deletion mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ add_mlir_dialect_library(MLIRLinalgTransforms
AllInterfaces.cpp
BubbleUpExtractSlice.cpp
BufferizableOpInterfaceImpl.cpp
Bufferize.cpp
ConstantFold.cpp
ConvertToDestinationStyle.cpp
ConvertConv2DToImg2Col.cpp
Expand Down
49 changes: 0 additions & 49 deletions mlir/lib/Dialect/Shape/Transforms/Bufferize.cpp

This file was deleted.

1 change: 0 additions & 1 deletion mlir/lib/Dialect/Shape/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
add_mlir_dialect_library(MLIRShapeOpsTransforms
BufferizableOpInterfaceImpl.cpp
Bufferize.cpp
OutlineShapeComputation.cpp
RemoveShapeConstraints.cpp
ShapeToShapeLowering.cpp
Expand Down
Loading
Loading