Skip to content

Commit d37056c

Browse files
authored
[MLIR][TOSA] Remove failed test cases (#68664)
I would put this into the implementation of verify for tosa.slice
1 parent 909087c commit d37056c

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ class SliceConverter : public OpConversionPattern<tosa::SliceOp> {
244244
Location loc = sliceOp.getLoc();
245245
Value input = adaptor.getInput();
246246
ShapedType resultType = cast<ShapedType>(sliceOp.getType());
247-
if (llvm::isa<UnrankedTensorType>(resultType) ||
248-
resultType.getRank() != static_cast<int64_t>(sliceOp.getSize().size()))
247+
if (llvm::isa<UnrankedTensorType>(resultType))
249248
return failure();
250249
SmallVector<int64_t> strides, sizes;
251250
ArrayRef<int64_t> starts = sliceOp.getStart();

mlir/test/Conversion/TosaToTensor/tosa-to-tensor-invalid.mlir

-7
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,3 @@ func.func @slice_resultType_unranked(%arg0: tensor<?xf32>) -> (tensor<*xf32>) {
66
%0 = "tosa.slice"(%arg0) {start = array<i64: 2>, size = array<i64: 0>} : (tensor<?xf32>) -> (tensor<*xf32>)
77
return %0 : tensor<*xf32>
88
}
9-
10-
// CHECK-LABEL: @slice_resultRank_neq_opSize
11-
func.func @slice_resultRank_neq_opSize(%arg0: tensor<12xf32>) -> (tensor<2xf32>) {
12-
// expected-error@+1 {{failed to legalize operation 'tosa.slice'}}
13-
%0 = "tosa.slice"(%arg0) {start = array<i64: 2>, size = array<i64: 2, 3>} : (tensor<12xf32>) -> (tensor<2xf32>)
14-
return %0 : tensor<2xf32>
15-
}

0 commit comments

Comments
 (0)