Replace mhlo ops with core dialect ops in some tests. (#9688)
Progress on https://github.com/iree-org/iree/issues/9667, working towards removing MHLO and other input dialects from the "core" parts of the IREE compiler. Any tests using input dialects should be organized under the relevant `compiler/InputConversion/*` or `tests/e2e/*_ops/` directories. Some exceptions are okay, such as samples and benchmarks, but it will be easier to spot those exceptions once more of these are cleaned up.
In this batch:
* A few mechanical changes from mhlo elementwise ops to arith/math elementside ops
* Changed "nested ops" and "attributes" tests in `Flow/Transforms/test/deduplicate_executables.mlir` from `mhlo.reduce` to `linalg.generic`
* Split `Flow/Transforms/test/transformation.mlir` (testing `--iree-mhlo-input-transformation-pipeline --iree-flow-transformation-pipeline`) into `Flow/Transforms/test/transformation_pipeline.mlir` and `InputConversion/MHLO/test/transformation_pipeline.mlir` (one test per pipeline)
diff --git a/tools/test/multiple_exported_functions.mlir b/tools/test/multiple_exported_functions.mlir
index ade9e9a..6eb1d20 100644
--- a/tools/test/multiple_exported_functions.mlir
+++ b/tools/test/multiple_exported_functions.mlir
@@ -4,12 +4,12 @@
module {
func.func @foo1() -> tensor<4xf32> {
%input = util.unfoldable_constant dense<[0.0, 1.0, 2.0, 4.0]> : tensor<4xf32>
- %result = "mhlo.exponential"(%input) : (tensor<4xf32>) -> tensor<4xf32>
+ %result = math.exp %input : tensor<4xf32>
return %result : tensor<4xf32>
}
func.func @foo2() -> tensor<4xf32> {
%input = util.unfoldable_constant dense<[0.0, 1.0, 2.0, 4.0]> : tensor<4xf32>
- %result = "mhlo.abs"(%input) : (tensor<4xf32>) -> tensor<4xf32>
+ %result = math.abs %input : tensor<4xf32>
return %result : tensor<4xf32>
}
}