Back to PBT run
input.mlir
dataflow.thread private @thread_0 domain(#dataflow.thread_domain<dense>)(%buf: memref<8xi32>, %arg0: index, %arg1: i32) ctrl (%thread_ctrl: none) {
%value = arith.constant 7 : i32
scf.forall (%lane) in (2) {
memref.store %value, %buf[%lane] : memref<8xi32>
}
dataflow.thread.yield
}
func.func @host_0() {
%buf = memref.alloc() : memref<8xi32>
%h0 = arith.constant 2 : index
%h1 = arith.constant 3 : i32
%token = dataflow.thread.launch @thread_0(%buf, %h0, %h1) : (memref<8xi32>, index, i32) -> !dataflow.thread_token
return
}
dataflow.thread private @thread_1 domain(#dataflow.thread_domain<dense>)(%buf: memref<8xi32>) ctrl (%thread_ctrl: none) iv (%coord_0: index, %coord_1: index) {
%value = arith.constant 7 : i32
scf.forall (%lane) in (2) {
memref.store %value, %buf[%lane] : memref<8xi32>
}
dataflow.thread.yield
}
func.func @host_1() {
%buf = memref.alloc() : memref<8xi32>
%g0 = arith.constant 4 : index
%g1 = arith.constant 4 : index
%token = dataflow.thread.launch @thread_1(%buf) grid(%g0, %g1) : (memref<8xi32>) -> !dataflow.thread_token
return
}