Skip to content

Commit aa1773b

Browse files
authored
Remove value bounds interface for ExpandShapeOp (#22460)
Signed-off-by: Jorn Tuyls <[email protected]>
1 parent cbbc931 commit aa1773b

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

compiler/src/iree/compiler/ExternalInterfaces/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ iree_compiler_cc_library(
5151
"@llvm-project//mlir:LinalgOpsIncGen",
5252
"@llvm-project//mlir:LinalgStructuredOpsIncGen",
5353
"@llvm-project//mlir:MLProgramDialect",
54-
"@llvm-project//mlir:MemRefDialect",
5554
"@llvm-project//mlir:TensorDialect",
5655
"@llvm-project//mlir:ValueBoundsOpInterface",
5756
],

compiler/src/iree/compiler/ExternalInterfaces/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ iree_cc_library(
3838
MLIRLinalgOpsIncGenLib
3939
MLIRLinalgStructuredOpsIncGenLib
4040
MLIRMLProgramDialect
41-
MLIRMemRefDialect
4241
MLIRTensorDialect
4342
MLIRValueBoundsOpInterface
4443
iree::compiler::Dialect::Encoding::IR

compiler/src/iree/compiler/ExternalInterfaces/UtilExternalModels.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "mlir/Dialect/Arith/IR/Arith.h"
2020
#include "mlir/Dialect/Linalg/IR/Linalg.h"
2121
#include "mlir/Dialect/MLProgram/IR/MLProgram.h"
22-
#include "mlir/Dialect/MemRef/IR/MemRef.h"
2322
#include "mlir/Dialect/Tensor/IR/Tensor.h"
2423
#include "mlir/IR/Matchers.h"
2524
#include "mlir/Interfaces/ValueBoundsOpInterface.h"
@@ -400,18 +399,6 @@ struct HoistableLinalgOpInterfaceHelper {
400399
}
401400
};
402401

403-
/// TODO(jtuyls): Remove when added to upstream.
404-
struct ExpandShapeOpValueBoundsInterface
405-
: public ValueBoundsOpInterface::ExternalModel<
406-
ExpandShapeOpValueBoundsInterface, memref::ExpandShapeOp> {
407-
void populateBoundsForShapedValueDim(Operation *op, Value value, int64_t dim,
408-
ValueBoundsConstraintSet &cstr) const {
409-
auto expandOp = cast<memref::ExpandShapeOp>(op);
410-
assert(value == expandOp.getResult() && "invalid value");
411-
cstr.bound(value)[dim] == expandOp.getOutputShape()[dim];
412-
}
413-
};
414-
415402
} // namespace
416403

417404
void registerUtilExternalModels(DialectRegistry &registry) {
@@ -529,12 +516,6 @@ void registerUtilExternalModels(DialectRegistry &registry) {
529516
IREE::Util::AssumeIntOp::attachInterface<
530517
UtilAssumeIntValueBoundsOpInterface>(*context);
531518
});
532-
533-
registry.addExtension(+[](MLIRContext *context,
534-
memref::MemRefDialect *dialect) {
535-
memref::ExpandShapeOp::attachInterface<ExpandShapeOpValueBoundsInterface>(
536-
*context);
537-
});
538519
}
539520

540521
} // namespace mlir::iree_compiler

0 commit comments

Comments
 (0)