[llvm-dev] [RFC] Upstreaming a proper SPIR-V backend

Johannes Doerfert via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 3 11:06:10 PST 2021


On 3/3/21 12:57 PM, Renato Golin via llvm-dev wrote:
> On Wed, 3 Mar 2021 at 18:41, Ronan KERYELL <ronan-list at keryell.fr> wrote:
>
>> But perhaps you were considering in your sentence the case where with
>> OpenMP/SYCL/CUDA/HIP you generate LLVM for the host code part and MLIR
>> just for the hardware accelerator parts?
>
> Just thinking out loud if clang couldn't be a hybrid front-end, emitting
> LLVM IR and MLIR for different parts of the program (for example,
> accelerators), and either use SPIRV (for supported accelerators) or lower
> to LLVM IR (for the rest). This would allow us to use MLIR directly in
> hybrid programming models (like OpenMP, OpenCL) and make real use of the
> high-level optimisations in MLIR. Perhaps SYCL wouldn't fit here.

As Ronan said, OpenMP (and others) is C/C++/Fortran + some additions.
Without having a full fledged C/C++ MLIR route we won't be able to build
a toolchain I would trust, not to mention the lack of evidence we need
to go to MLIR in the first place ;)

~ Johannes


>
> I'm just going back to the overall goal of MLIR and trying to see on our
> current approach, what do we lower too soon to LLVM IR, so it could lower
> to MLIR instead, piece wise, then lower to LLVM IR (or not) later.
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list