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

Fabian Mora llvmlistbot at llvm.org
Mon Jan 15 06:30:54 PST 2024


fabianmcg wrote:

> I am wondering if you have plan to support cases like below?

When creating this op I even thought things like multi-target resolution should be valid:
```
gpu.conditional_execution #nvvm.target<chip="sm_70"> {
 ...
} #rocdl.target<chip="gfx90a"> {
 ...
}
```
But then I started thinking it might be better to have a separate op just for that. The reason for a separate op is that `conditional_execution` semantics specify that if the op returns values, then both regions (host, dev) must be specified for the op to be valid.
Adding targets made it difficult to hold that invariant.

I was thinking that maybe for conditional target execution it would be better to have that op in a different more generic dialect, as other dialects could benefit from that pattern as well.

So to answer your question, probably in the future. 

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


More information about the Mlir-commits mailing list