[Mlir-commits] [mlir] [mlir][gpu] Introduce the `gpu.conditional_execution` op (PR #78013)

Guray Ozen llvmlistbot at llvm.org
Mon Jan 15 02:43:30 PST 2024


grypp wrote:

If I understand correctly, this op removes host or device region during compile-time based on the context. I'm curious about the use case for this.

Also, what happens in the code below? I assume that the pass removes gpu region in foo as it's not a `gpu.func`, so gpu kernel will run host region.
```
func.func @foo(...) {
	gpu.conditional_execution device {
      gpu.yield
    } host {
      gpu.yield
    }
}

func.func @bar(...) {
  gpu.launch ... {
    call @foo()
    gpu.terminator
  }
  return
}
```

https://github.com/llvm/llvm-project/pull/78013


More information about the Mlir-commits mailing list