[Mlir-commits] [mlir] [mlir][gpu][RFC] Add a source language enum attribute to gpu.func and gpu.launch ops (PR #133163)

Valentin Clement バレンタイン クレメン llvmlistbot at llvm.org
Wed Mar 26 14:39:40 PDT 2025


clementval wrote:

> > The kernel launch for OpenACC and CUDA Fortran are using different mechanism
> 
> Can you elaborate on that? We have the following cases:
> 
> 1. Only CUDA Fortran
> 2. Only OpenACC
> 3. CUDA Fortran + OpenACC together
> 
> The only difference I can guess is the CUDA runtime vs. the CUDA driver. The 1st and 3rd use the CUDA runtime, and the 2nd uses the CUDA driver. I might be wrong here. Is that why you need to know the programming model?

This is the current situation in one compiler. For upstream support the OpenACC offloading is likely to use the offload runtime (tgt API) while the CUDA Fortran kernel will be using a dedicated API.

So when converting `gpu.launch_func` it would be nice to have the information at hand. We can live with a non GPU dialect attribute but there is always the problem that it can be discarded somewhere along the way. 

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


More information about the Mlir-commits mailing list