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
158 lines
4.8 KiB
MLIR
158 lines
4.8 KiB
MLIR
// RUN: mlir-opt -test-generic-ir-visitors-interrupt -allow-unregistered-dialect -split-input-file %s | FileCheck %s
|
|
|
|
// Walk is interrupted before visiting "foo"
|
|
func.func @main(%arg0: f32) -> f32 {
|
|
%v1 = "foo"() {interrupt_before_all = true} : () -> f32
|
|
%v2 = arith.addf %v1, %arg0 : f32
|
|
return %v2 : f32
|
|
}
|
|
|
|
// CHECK: step 0 op 'builtin.module' before all regions
|
|
// CHECK: step 1 op 'func.func' before all regions
|
|
// CHECK: step 2 walk was interrupted
|
|
|
|
// -----
|
|
|
|
// Walk is interrupted after visiting "foo" (which has a single empty region)
|
|
func.func @main(%arg0: f32) -> f32 {
|
|
%v1 = "foo"() ({ "bar"() : ()-> () }) {interrupt_after_all = true} : () -> f32
|
|
%v2 = arith.addf %v1, %arg0 : f32
|
|
return %v2 : f32
|
|
}
|
|
|
|
// CHECK: step 0 op 'builtin.module' before all regions
|
|
// CHECK: step 1 op 'func.func' before all regions
|
|
// CHECK: step 2 op 'foo' before all regions
|
|
// CHECK: step 3 op 'bar' before all regions
|
|
// CHECK: step 4 walk was interrupted
|
|
|
|
// -----
|
|
|
|
// Walk is interrupted after visiting "foo"'s 1st region.
|
|
func.func @main(%arg0: f32) -> f32 {
|
|
%v1 = "foo"() ({
|
|
"bar0"() : () -> ()
|
|
}, {
|
|
"bar1"() : () -> ()
|
|
}) {interrupt_after_region = 0} : () -> f32
|
|
%v2 = arith.addf %v1, %arg0 : f32
|
|
return %v2 : f32
|
|
}
|
|
|
|
// CHECK: step 0 op 'builtin.module' before all regions
|
|
// CHECK: step 1 op 'func.func' before all regions
|
|
// CHECK: step 2 op 'foo' before all regions
|
|
// CHECK: step 3 op 'bar0' before all regions
|
|
// CHECK: step 4 walk was interrupted
|
|
|
|
|
|
// -----
|
|
|
|
// Test static filtering.
|
|
func.func @main() {
|
|
"foo"() : () -> ()
|
|
"test.two_region_op"()(
|
|
{"work"() : () -> ()},
|
|
{"work"() : () -> ()}
|
|
) {interrupt_after_all = true} : () -> ()
|
|
return
|
|
}
|
|
|
|
// CHECK: step 0 op 'builtin.module' before all regions
|
|
// CHECK: step 1 op 'func.func' before all regions
|
|
// CHECK: step 2 op 'foo' before all regions
|
|
// CHECK: step 3 op 'test.two_region_op' before all regions
|
|
// CHECK: step 4 op 'work' before all regions
|
|
// CHECK: step 5 op 'test.two_region_op' before region #1
|
|
// CHECK: step 6 op 'work' before all regions
|
|
// CHECK: step 7 walk was interrupted
|
|
// CHECK: step 8 op 'test.two_region_op' before all regions
|
|
// CHECK: step 9 op 'test.two_region_op' before region #1
|
|
// CHECK: step 10 walk was interrupted
|
|
|
|
// -----
|
|
|
|
// Test static filtering.
|
|
func.func @main() {
|
|
"foo"() : () -> ()
|
|
"test.two_region_op"()(
|
|
{"work"() : () -> ()},
|
|
{"work"() : () -> ()}
|
|
) {interrupt_after_region = 0} : () -> ()
|
|
return
|
|
}
|
|
|
|
// CHECK: step 0 op 'builtin.module' before all regions
|
|
// CHECK: step 1 op 'func.func' before all regions
|
|
// CHECK: step 2 op 'foo' before all regions
|
|
// CHECK: step 3 op 'test.two_region_op' before all regions
|
|
// CHECK: step 4 op 'work' before all regions
|
|
// CHECK: step 5 walk was interrupted
|
|
// CHECK: step 6 op 'test.two_region_op' before all regions
|
|
// CHECK: step 7 walk was interrupted
|
|
|
|
// -----
|
|
// Test skipping.
|
|
|
|
// Walk is skipped before visiting "foo".
|
|
func.func @main(%arg0: f32) -> f32 {
|
|
%v1 = "foo"() ({
|
|
"bar0"() : () -> ()
|
|
}, {
|
|
"bar1"() : () -> ()
|
|
}) {skip_before_all = true} : () -> f32
|
|
%v2 = arith.addf %v1, %arg0 : f32
|
|
return %v2 : f32
|
|
}
|
|
|
|
// CHECK: step 0 op 'builtin.module' before all regions
|
|
// CHECK: step 1 op 'func.func' before all regions
|
|
// CHECK: step 2 op 'arith.addf' before all regions
|
|
// CHECK: step 3 op 'func.return' before all regions
|
|
// CHECK: step 4 op 'func.func' after all regions
|
|
// CHECK: step 5 op 'builtin.module' after all regions
|
|
|
|
// -----
|
|
// Walk is skipped after visiting all regions of "foo".
|
|
func.func @main(%arg0: f32) -> f32 {
|
|
%v1 = "foo"() ({
|
|
"bar0"() : () -> ()
|
|
}, {
|
|
"bar1"() : () -> ()
|
|
}) {skip_after_all = true} : () -> f32
|
|
%v2 = arith.addf %v1, %arg0 : f32
|
|
return %v2 : f32
|
|
}
|
|
|
|
// CHECK: step 0 op 'builtin.module' before all regions
|
|
// CHECK: step 1 op 'func.func' before all regions
|
|
// CHECK: step 2 op 'foo' before all regions
|
|
// CHECK: step 3 op 'bar0' before all regions
|
|
// CHECK: step 4 op 'foo' before region #1
|
|
// CHECK: step 5 op 'bar1' before all regions
|
|
// CHECK: step 6 op 'arith.addf' before all regions
|
|
// CHECK: step 7 op 'func.return' before all regions
|
|
// CHECK: step 8 op 'func.func' after all regions
|
|
// CHECK: step 9 op 'builtin.module' after all regions
|
|
|
|
// -----
|
|
// Walk is skipped after visiting first region of "foo".
|
|
func.func @main(%arg0: f32) -> f32 {
|
|
%v1 = "foo"() ({
|
|
"bar0"() : () -> ()
|
|
}, {
|
|
"bar1"() : () -> ()
|
|
}) {skip_after_region = 0} : () -> f32
|
|
%v2 = arith.addf %v1, %arg0 : f32
|
|
return %v2 : f32
|
|
}
|
|
|
|
// CHECK: step 0 op 'builtin.module' before all regions
|
|
// CHECK: step 1 op 'func.func' before all regions
|
|
// CHECK: step 2 op 'foo' before all regions
|
|
// CHECK: step 3 op 'bar0' before all regions
|
|
// CHECK: step 4 op 'arith.addf' before all regions
|
|
// CHECK: step 5 op 'func.return' before all regions
|
|
// CHECK: step 6 op 'func.func' after all regions
|
|
// CHECK: step 7 op 'builtin.module' after all regions
|