Skip to content

Commit

Permalink
Merge pull request #213 from Xilinx/jrickert.check-dag
Browse files Browse the repository at this point in the history
Use CHECK-DAG instead of CHECK to make location test more robust
  • Loading branch information
jorickert authored Nov 20, 2024
2 parents 149399a + c8f8934 commit 2663cef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/mlir/onnx/onnx_constprop_locations.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ func.func @test_add_constant_1_loc(%arg0 : tensor<3xf32>) -> tensor<3xf32> {
"onnx.Return"(%1) : (tensor<3xf32>) -> ()
// CHECK-NEXT: [[CONST:%.+]] = onnx.Constant dense<[0.000000e+00, 1.000000e+00, 2.000000e+00]> : tensor<3xf32> loc([[LOC_CONST:#.+]])
// CHECK-NEXT: [[ADD:%.+]] = "onnx.Add"(%arg0, [[CONST]]) : (tensor<3xf32>, tensor<3xf32>) -> tensor<3xf32> loc([[LOC_ADD:#.+]])
// CHECK: [[LOC_CONST]] = loc("Constant")
// CHECK: [[LOC_ADD]] = loc("Add")
// CHECK-DAG: [[LOC_CONST]] = loc("Constant")
// CHECK-DAG: [[LOC_ADD]] = loc("Add")
}

// -----
Expand All @@ -24,7 +24,7 @@ func.func @test_mul_constant_1_loc(%arg0 : tensor<3xf32>) -> tensor<3xf32> {
"onnx.Return"(%1) : (tensor<3xf32>) -> ()
// CHECK-NEXT: [[CONST:%.+]] = onnx.Constant dense<[0.000000e+00, 1.000000e+00, 2.000000e+00]> : tensor<3xf32> loc([[LOC_CONST:#.+]])
// CHECK-NEXT: [[MUL:%.+]] = "onnx.Mul"(%arg0, [[CONST]]) : (tensor<3xf32>, tensor<3xf32>) -> tensor<3xf32> loc([[LOC_MUL:#.+]])
// CHECK: [[LOC_CONST]] = loc("Constant")
// CHECK: [[LOC_MUL]] = loc("Mul")
// CHECK-DAG: [[LOC_CONST]] = loc("Constant")
// CHECK-DAG: [[LOC_MUL]] = loc("Mul")
}

0 comments on commit 2663cef

Please sign in to comment.