[Mlir-commits] [mlir] [MLIR][TOSA] Remove failed test cases (PR #68664)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Oct 9 23:37:04 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: LiqinWeng (LiqinWeng)
<details>
<summary>Changes</summary>
I would put this into the implementation of verify for tosa.slice
---
Full diff: https://github.com/llvm/llvm-project/pull/68664.diff
2 Files Affected:
- (modified) mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp (+1-2)
- (modified) mlir/test/Conversion/TosaToTensor/tosa-to-tensor-invalid.mlir (-7)
``````````diff
diff --git a/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp b/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
index 7a62429d3700443..06ec53d19b1e956 100644
--- a/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
+++ b/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
@@ -244,8 +244,7 @@ class SliceConverter : public OpConversionPattern<tosa::SliceOp> {
Location loc = sliceOp.getLoc();
Value input = adaptor.getInput();
ShapedType resultType = cast<ShapedType>(sliceOp.getType());
- if (llvm::isa<UnrankedTensorType>(resultType) ||
- resultType.getRank() != static_cast<int64_t>(sliceOp.getSize().size()))
+ if (llvm::isa<UnrankedTensorType>(resultType))
return failure();
SmallVector<int64_t> strides, sizes;
ArrayRef<int64_t> starts = sliceOp.getStart();
diff --git a/mlir/test/Conversion/TosaToTensor/tosa-to-tensor-invalid.mlir b/mlir/test/Conversion/TosaToTensor/tosa-to-tensor-invalid.mlir
index cfa1c41f2467985..36eb4d4669b07ae 100644
--- a/mlir/test/Conversion/TosaToTensor/tosa-to-tensor-invalid.mlir
+++ b/mlir/test/Conversion/TosaToTensor/tosa-to-tensor-invalid.mlir
@@ -6,10 +6,3 @@ func.func @slice_resultType_unranked(%arg0: tensor<?xf32>) -> (tensor<*xf32>) {
%0 = "tosa.slice"(%arg0) {start = array<i64: 2>, size = array<i64: 0>} : (tensor<?xf32>) -> (tensor<*xf32>)
return %0 : tensor<*xf32>
}
-
-// CHECK-LABEL: @slice_resultRank_neq_opSize
-func.func @slice_resultRank_neq_opSize(%arg0: tensor<12xf32>) -> (tensor<2xf32>) {
- // expected-error at +1 {{failed to legalize operation 'tosa.slice'}}
- %0 = "tosa.slice"(%arg0) {start = array<i64: 2>, size = array<i64: 2, 3>} : (tensor<12xf32>) -> (tensor<2xf32>)
- return %0 : tensor<2xf32>
-}
``````````
</details>
https://github.com/llvm/llvm-project/pull/68664
More information about the Mlir-commits
mailing list