CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
245 lines
6.4 KiB
MLIR
245 lines
6.4 KiB
MLIR
// RUN: mlir-opt %s -split-input-file --test-operations-equality | FileCheck %s
|
|
|
|
|
|
// CHECK-LABEL: test.top_level_op
|
|
// CHECK-SAME: compares equals
|
|
|
|
"test.top_level_op"() : () -> ()
|
|
"test.top_level_op"() : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.top_level_op_strict_loc
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.top_level_op_strict_loc"() { strict_loc_check } : () -> ()
|
|
"test.top_level_op_strict_loc"() { strict_loc_check } : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.top_level_op_loc_match
|
|
// CHECK-SAME: compares equals
|
|
|
|
"test.top_level_op_loc_match"() { strict_loc_check } : () -> () loc("foo")
|
|
"test.top_level_op_loc_match"() { strict_loc_check } : () -> () loc("foo")
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.top_level_op_block_loc_mismatch
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.top_level_op_block_loc_mismatch"() ({
|
|
^bb0(%a : i32):
|
|
}) { strict_loc_check } : () -> () loc("foo")
|
|
"test.top_level_op_block_loc_mismatch"() ({
|
|
^bb0(%a : i32):
|
|
}) { strict_loc_check } : () -> () loc("foo")
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.top_level_op_block_loc_match
|
|
// CHECK-SAME: compares equals
|
|
|
|
"test.top_level_op_block_loc_match"() ({
|
|
^bb0(%a : i32 loc("bar")):
|
|
}) { strict_loc_check } : () -> () loc("foo")
|
|
"test.top_level_op_block_loc_match"() ({
|
|
^bb0(%a : i32 loc("bar")):
|
|
}) { strict_loc_check } : () -> () loc("foo")
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.top_level_name_mismatch
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.top_level_name_mismatch"() : () -> ()
|
|
"test.top_level_name_mismatch2"() : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.top_level_op_attr_mismatch
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.top_level_op_attr_mismatch"() { foo = "bar" } : () -> ()
|
|
"test.top_level_op_attr_mismatch"() { foo = "bar2"} : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.top_level_op_cfg
|
|
// CHECK-SAME: compares equals
|
|
|
|
"test.top_level_op_cfg"() ({
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"(%arg1, %arg0) [^bb1, ^bb2] : (f32, i32) -> ()
|
|
^bb1(%arg2 : f32):
|
|
"test.some_branching_op"() : () -> ()
|
|
^bb2(%arg3 : i32):
|
|
"test.some_branching_op"() : () -> ()
|
|
}, {
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"(%arg1, %arg0) [^bb1, ^bb2] : (f32, i32) -> ()
|
|
^bb1(%arg2 : f32):
|
|
"test.some_branching_op"() : () -> ()
|
|
^bb2(%arg3 : i32):
|
|
"test.some_branching_op"() : () -> ()
|
|
})
|
|
{ attr = "foo" } : () -> ()
|
|
"test.top_level_op_cfg"() ({
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"(%arg1, %arg0) [^bb1, ^bb2] : (f32, i32) -> ()
|
|
^bb1(%arg2 : f32):
|
|
"test.some_branching_op"() : () -> ()
|
|
^bb2(%arg3 : i32):
|
|
"test.some_branching_op"() : () -> ()
|
|
}, {
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"(%arg1, %arg0) [^bb1, ^bb2] : (f32, i32) -> ()
|
|
^bb1(%arg2 : f32):
|
|
"test.some_branching_op"() : () -> ()
|
|
^bb2(%arg3 : i32):
|
|
"test.some_branching_op"() : () -> ()
|
|
})
|
|
{ attr = "foo" } : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.operand_num_mismatch
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.operand_num_mismatch"() ({
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"(%arg1, %arg0) : (f32, i32) -> ()
|
|
}) : () -> ()
|
|
"test.operand_num_mismatch"() ({
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"(%arg1) : (f32) -> ()
|
|
}) : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.operand_type_mismatch
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.operand_type_mismatch"() ({
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"(%arg1, %arg0) : (f32, i32) -> ()
|
|
}) : () -> ()
|
|
"test.operand_type_mismatch"() ({
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"(%arg1, %arg1) : (f32, f32) -> ()
|
|
}) : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.block_type_mismatch
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.block_type_mismatch"() ({
|
|
^bb0(%arg0 : f32, %arg1 : f32):
|
|
"test.some_branching_op"() : () -> ()
|
|
}) : () -> ()
|
|
"test.block_type_mismatch"() ({
|
|
^bb0(%arg0 : i32, %arg1 : f32):
|
|
"test.some_branching_op"() : () -> ()
|
|
}) : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.block_arg_num_mismatch
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.block_arg_num_mismatch"() ({
|
|
^bb0(%arg0 : f32, %arg1 : f32):
|
|
"test.some_branching_op"() : () -> ()
|
|
}) : () -> ()
|
|
"test.block_arg_num_mismatch"() ({
|
|
^bb0(%arg0 : f32):
|
|
"test.some_branching_op"() : () -> ()
|
|
}) : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.dataflow_match
|
|
// CHECK-SAME: compares equals
|
|
|
|
"test.dataflow_match"() ({
|
|
%0:2 = "test.producer"() : () -> (i32, i32)
|
|
"test.consumer"(%0#0, %0#1) : (i32, i32) -> ()
|
|
}) : () -> ()
|
|
"test.dataflow_match"() ({
|
|
%0:2 = "test.producer"() : () -> (i32, i32)
|
|
"test.consumer"(%0#0, %0#1) : (i32, i32) -> ()
|
|
}) : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.dataflow_mismatch
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.dataflow_mismatch"() ({
|
|
%0:2 = "test.producer"() : () -> (i32, i32)
|
|
"test.consumer"(%0#0, %0#1) : (i32, i32) -> ()
|
|
}) : () -> ()
|
|
"test.dataflow_mismatch"() ({
|
|
%0:2 = "test.producer"() : () -> (i32, i32)
|
|
"test.consumer"(%0#1, %0#0) : (i32, i32) -> ()
|
|
}) : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.commutatively_equal_permutation
|
|
// CHECK-SAME: compares equals
|
|
|
|
builtin.module attributes {test.includes_setup} {
|
|
%0:2 = "test.producer"() : () -> (i32, i32)
|
|
"test.commutatively_equal_permutation"() ({
|
|
arith.addi %0#0, %0#1 : i32
|
|
}) : () -> ()
|
|
"test.commutatively_equal_permutation"() ({
|
|
arith.addi %0#1, %0#0 : i32
|
|
}) : () -> ()
|
|
}
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.ignore_commutatively_equal_permutation
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
builtin.module attributes {test.includes_setup} {
|
|
%0:2 = "test.producer"() : () -> (i32, i32)
|
|
"test.ignore_commutatively_equal_permutation"() ({
|
|
arith.addi %0#0, %0#1 : i32
|
|
}) { ignore_commutativity } : () -> ()
|
|
"test.ignore_commutatively_equal_permutation"() ({
|
|
arith.addi %0#1, %0#0 : i32
|
|
}) { ignore_commutativity } : () -> ()
|
|
}
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.commutatively_equal
|
|
// CHECK-SAME: compares equals
|
|
|
|
"test.commutatively_equal"() ({
|
|
^bb0(%arg0 : i32, %arg1 : i32):
|
|
arith.addi %arg0, %arg1 : i32
|
|
}) : () -> ()
|
|
"test.commutatively_equal"() ({
|
|
^bb0(%arg0 : i32, %arg1 : i32):
|
|
arith.addi %arg1, %arg0 : i32
|
|
}) : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: test.ignore_commutatively_equal
|
|
// CHECK-SAME: compares NOT equals
|
|
|
|
"test.ignore_commutatively_equal"() ({
|
|
^bb0(%arg0 : i32, %arg1 : i32):
|
|
arith.addi %arg0, %arg1 : i32
|
|
}) { ignore_commutativity } : () -> ()
|
|
"test.ignore_commutatively_equal"() ({
|
|
^bb0(%arg0 : i32, %arg1 : i32):
|
|
arith.addi %arg1, %arg0 : i32
|
|
}) { ignore_commutativity } : () -> ()
|