Back to PBT run
input.mlir
module {
dataflow.thread private @thread_0 domain(#dataflow.thread_domain<dense>)(%target: memref<4xi32>, %value: i32, %enabled: i1, %limit: index) ctrl (%start: none) {
%c_zero_0 = arith.constant 0 : index
%c_one_0 = arith.constant 1 : index
scf.if %enabled {
"loom.spatial_region"()
<{operandSegmentSizes = array<i32: 0, 0, 0, 0>,
resultSegmentSizes = array<i32: 0, 0>}> ({
^bb_entry:
"loom.spatial_yield"()
<{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
}) {graph_name = "graph_0_0", source_maps = []} : () -> ()
}
scf.if %enabled {
%out_0_1 = "loom.spatial_region"(%value)
<{operandSegmentSizes = array<i32: 1, 0, 0, 0>,
resultSegmentSizes = array<i32: 1, 0>}> ({
^bb_entry(%lane_0_1: i32):
%sum_0_1 = arith.addi %lane_0_1, %lane_0_1 : i32
"loom.spatial_yield"(%sum_0_1)
<{operandSegmentSizes = array<i32: 1, 0>}> : (i32) -> ()
}) {graph_name = "graph_0_1", source_maps = []} : (i32) -> i32
}
dataflow.thread.yield
}
dataflow.thread private @thread_1 domain(#dataflow.thread_domain<dense>)(%target: memref<4xi32>, %value: i32, %enabled: i1, %limit: index) ctrl (%start: none) {
%c_zero_1 = arith.constant 0 : index
%c_one_1 = arith.constant 1 : index
scf.for %iv_1_0 = %c_zero_1 to %limit step %c_one_1 {
scf.if %enabled {
"loom.spatial_region"()
<{operandSegmentSizes = array<i32: 0, 0, 0, 0>,
resultSegmentSizes = array<i32: 0, 0>}> ({
^bb_entry:
"loom.spatial_yield"()
<{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
}) {graph_name = "graph_1_0", source_maps = []} : () -> ()
}
}
scf.for %iv_1_1 = %c_zero_1 to %limit step %c_one_1 {
scf.if %enabled {
%out_1_1 = "loom.spatial_region"(%value)
<{operandSegmentSizes = array<i32: 1, 0, 0, 0>,
resultSegmentSizes = array<i32: 1, 0>}> ({
^bb_entry(%lane_1_1: i32):
%sum_1_1 = arith.addi %lane_1_1, %lane_1_1 : i32
"loom.spatial_yield"(%sum_1_1)
<{operandSegmentSizes = array<i32: 1, 0>}> : (i32) -> ()
}) {graph_name = "graph_1_1", source_maps = []} : (i32) -> i32
}
}
dataflow.thread.yield
}
dataflow.thread private @thread_2 domain(#dataflow.thread_domain<dense>)(%target: memref<4xi32>, %value: i32, %enabled: i1, %limit: index) ctrl (%start: none) {
%c_zero_2 = arith.constant 0 : index
%c_one_2 = arith.constant 1 : index
scf.if %enabled {
"loom.spatial_region"()
<{operandSegmentSizes = array<i32: 0, 0, 0, 0>,
resultSegmentSizes = array<i32: 0, 0>}> ({
^bb_entry:
"loom.spatial_yield"()
<{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
}) {graph_name = "graph_2_0", source_maps = []} : () -> ()
}
"loom.spatial_region"()
<{operandSegmentSizes = array<i32: 0, 0, 0, 0>,
resultSegmentSizes = array<i32: 0, 0>}> ({
^bb_entry:
"loom.spatial_yield"()
<{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
}) {graph_name = "graph_2_1", source_maps = []} : () -> ()
dataflow.thread.yield
}
}