Skip to content

Commit

Permalink
Fix lit tset for constant prop for onnx.Gather with no rank indices.
Browse files Browse the repository at this point in the history
Signed-off-by: Yasushi Negishi <[email protected]>
  • Loading branch information
negiyas committed Sep 8, 2023
1 parent 8ba69d0 commit 5a0396b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/mlir/onnx/onnx_constprop.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -1650,14 +1650,14 @@ func.func @test_gather_axis_1() -> tensor<*xf32>{

func.func @test_gather_no_rank_indices() -> tensor<*xi64>{
%0 = onnx.Constant dense<[1, 2]> : tensor<2xi64>
%1 = onnx.Constant dense<0> : tensor<i64>
%2 = "onnx.Gather"(%0, %1) {axis = 0 : si64} : (tensor<2xi64>, tensor<i64>) -> tensor<*xi64>
%1 = onnx.Constant dense<0> : tensor<i32>
%2 = "onnx.Gather"(%0, %1) {axis = 0 : si64} : (tensor<2xi64>, tensor<i32>) -> tensor<*xi64>
"onnx.Return"(%2) : (tensor<*xi64>) -> ()

// CHECK-LABEL: func @test_gather_no_rank_indices
// CHECK: [[VAR_0_:%.+]] = onnx.Constant dense<[1, 2]> : tensor<2xi64>
// CHECK: [[VAR_1_:%.+]] = onnx.Constant dense<0> : tensor<i64>
// CHECK: [[VAR_2_:%.+]] = "onnx.Gather"([[VAR_0_]], [[VAR_1_]]) {axis = 0 : si64} : (tensor<2xi64>, tensor<i64>) -> tensor<i64>
// CHECK: [[VAR_1_:%.+]] = onnx.Constant dense<0> : tensor<i32>
// CHECK: [[VAR_2_:%.+]] = "onnx.Gather"([[VAR_0_]], [[VAR_1_]]) {axis = 0 : si64} : (tensor<2xi64>, tensor<i32>) -> tensor<i64>
// CHECK: onnx.Return [[VAR_2_]] : tensor<i64>
}

Expand Down

0 comments on commit 5a0396b

Please sign in to comment.