Back to PBT run

input.mlir

module {
func.func @host_container(%target: memref<4xi32>, %value: i32) {
  %hz = arith.constant 0 : index
  %hf = arith.constant 4 : index
  %ho = arith.constant 1 : index
  scf.for %hi = %hz to %hf step %ho {
    memref.store %value, %target[%hi] : memref<4xi32>
  }
  return
}

dataflow.thread private @thread_0 domain(#dataflow.thread_domain<dense>)(%target: memref<1xi32>, %value: i32, %enabled: i1)
    ctrl (%ctrl: none) {
  %c_zero = arith.constant 0 : index
  %c_one = arith.constant 1 : index
  %c_trip = arith.constant 4 : index
  scf.for %iv = %c_zero to %c_trip step %c_one {
    scf.if %enabled {
      "loom.spatial_region"(%value, %target)
          <{operandSegmentSizes = array<i32: 1, 0, 1, 0>,
            resultSegmentSizes = array<i32: 0, 0>}> ({
        ^bb0(%payload: i32, %memory: memref<1xi32>):
          %zero = arith.constant 0 : index
          memref.store %payload, %memory[%zero] : memref<1xi32>
          "loom.spatial_yield"()
              <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
      }) {graph_name = "graph_0", source_maps = []} : (i32, memref<1xi32>) -> ()
    }
  }
  dataflow.thread.yield
}

dataflow.thread private @thread_1 domain(#dataflow.thread_domain<dense>)(%target: memref<1xi32>, %value: i32, %enabled: i1)
    ctrl (%ctrl: none) {
  %c_zero = arith.constant 0 : index
  %c_one = arith.constant 1 : index
  %c_trip = arith.constant 4 : index
  scf.for %iv = %c_zero to %c_trip step %c_one {
    scf.if %enabled {
      "loom.spatial_region"()
          <{operandSegmentSizes = array<i32: 0, 0, 0, 0>,
            resultSegmentSizes = array<i32: 0, 0>}> ({
        ^bb0:
          "loom.spatial_yield"()
              <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
      }) {graph_name = "graph_1", source_maps = []} : () -> ()
    }
  }
  dataflow.thread.yield
}

dataflow.thread private @thread_2 domain(#dataflow.thread_domain<dense>)(%target: memref<1xi32>, %value: i32, %enabled: i1)
    ctrl (%ctrl: none) {
      "loom.spatial_region"()
          <{operandSegmentSizes = array<i32: 0, 0, 0, 0>,
            resultSegmentSizes = array<i32: 0, 0>}> ({
        ^bb0:
          "loom.spatial_yield"()
              <{operandSegmentSizes = array<i32: 0, 0>}> : () -> ()
      }) {graph_name = "graph_2", source_maps = []} : () -> ()
  dataflow.thread.yield
}

}