Skip to content

Commit 6571311

Browse files
update
2 parents 884b484 + 2c8e8e5 commit 6571311

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ project(onnx-mlir)
88
option(ONNX_MLIR_BUILD_TESTS "Build ONNX-MLIR test executables. If OFF, just generate build targets." ON)
99
option(ONNX_MLIR_CCACHE_BUILD "Set to ON for a ccache enabled build." OFF)
1010
option(ONNX_MLIR_ENABLE_STABLEHLO "Enable StableHLO support." ON)
11-
option(ONNX_MLIR_DECOMP_ONNX_CONVTRANSPOSE "Enable ONNXConvTransposeOp decomposition." ON)
1211
option(ONNX_MLIR_ENABLE_WERROR "Enable warnings as errors." OFF)
1312
option(ONNX_MLIR_SUPPRESS_THIRD_PARTY_WARNINGS "Suppress warning in third_party code." ON)
1413
option(ONNX_MLIR_ENABLE_JAVA "Set to ON for building the Java runtime, tools, and tests" ON)
@@ -208,10 +207,6 @@ if (ONNX_MLIR_ENABLE_STABLEHLO)
208207
add_compile_definitions(ONNX_MLIR_ENABLE_STABLEHLO)
209208
endif()
210209

211-
if (ONNX_MLIR_DECOMP_ONNX_CONVTRANSPOSE)
212-
add_compile_definitions(ONNX_MLIR_DECOMP_ONNX_CONVTRANSPOSE)
213-
endif()
214-
215210
add_subdirectory(utils)
216211
add_subdirectory(include)
217212
add_subdirectory(src)

src/Dialect/ONNX/Transforms/Decompose.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,10 @@ bool hasStaticSpatialDims(Value v) {
332332
}
333333

334334
bool shouldDecomposeConvTransposeOp(Value convTransposeResult) {
335-
#ifdef ONNX_MLIR_DECOMP_ONNX_CONVTRANSPOSE
336335
ONNXConvTransposeOp op =
337336
mlir::cast<ONNXConvTransposeOp>(convTransposeResult.getDefiningOp());
338337
return hasShapeAndRank(convTransposeResult) &&
339338
hasStaticSpatialDims(op.getX()) && hasStaticSpatialDims(op.getW());
340-
#else
341-
// Disable the ONNXConvTransposeOp decomposition patterns.
342-
return false;
343-
#endif
344339
}
345340

346341
// Split on the specified axis. The length of each output is one.
@@ -1128,7 +1123,6 @@ void DecomposeONNXToONNXPass::runOnOperation() {
11281123
op, alpha, rankA, rankB);
11291124
});
11301125

1131-
#ifdef ONNX_MLIR_DECOMP_ONNX_CONVTRANSPOSE
11321126
#ifdef ONNX_MLIR_ENABLE_STABLEHLO
11331127
// ONNXtoStablehlo pass has own rewriting for ConvTranspose Op using
11341128
// stablehlo ops. To avoid conflict with it, decomposing for ConvTranspose
@@ -1141,7 +1135,6 @@ void DecomposeONNXToONNXPass::runOnOperation() {
11411135
});
11421136
#ifdef ONNX_MLIR_ENABLE_STABLEHLO
11431137
}
1144-
#endif
11451138
#endif
11461139

11471140
RewritePatternSet patterns(context);

0 commit comments

Comments
 (0)