forked from onnx/onnx-mlir
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove restrictions on ONNXPow (#100)
* Remove restructions on ONNXPow * Test case for onnx.Pow Add a test case for onnx.Pow that shows that no conversion actually happens * Rename the file
- Loading branch information
Showing
2 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/mlir/conversion/onnx_to_tosa/Math/Pow-unsupported.mlir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: onnx-mlir-opt --shape-inference --convert-onnx-to-tosa %s -split-input-file | FileCheck %s | ||
|
||
// onnx.Pow with integer exponent is not supported in TOSA. | ||
// This test checks that the conversion does not fail but, instead, it keeps the | ||
// original version of the op. | ||
|
||
func.func @test_less_broadcast(%arg0: tensor<5xi32>, %arg1: tensor<5xi32>) -> tensor<*xi32> { | ||
%0 = "onnx.Pow"(%arg0, %arg1) : (tensor<5xi32>, tensor<5xi32>) -> tensor<*xi32> | ||
onnx.Return %0 : tensor<*xi32> | ||
|
||
// CHECK: test_less_broadcast | ||
// CHECK-SAME: (%[[ARG_0:.*]]: tensor<5xi32>, %[[ARG_1:.*]]: tensor<5xi32>) -> tensor<5xi32> | ||
// CHECK-NEXT: %[[VAL_0:.*]] = "onnx.Pow"(%[[ARG_0]], %[[ARG_1]]) : (tensor<5xi32>, tensor<5xi32>) -> tensor<5xi32> | ||
// CHECK-NEXT: onnx.Return %[[VAL_0]] : tensor<5xi32> | ||
|
||
} |