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

Ronan KERYELL via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 3 11:54:46 PST 2021


>>>>> On Wed, 3 Mar 2021 18:57:33 +0000, Renato Golin <rengolin at gmail.com> said:

    Renato> Just thinking out loud if clang couldn't be a hybrid
    Renato> front-end, emitting LLVM IR and MLIR for different parts of
    Renato> the program (for example, accelerators), and either use
    Renato> SPIRV (for supported accelerators) or lower to LLVM IR (for
    Renato> the rest).

At some point everything is possible.

    Renato> This would allow us to use MLIR directly in hybrid
    Renato> programming models (like OpenMP, OpenCL) and make real use
    Renato> of the high-level optimisations in MLIR. Perhaps SYCL
    Renato> wouldn't fit here.

I guess you have exchanged the words OpenCL and SYCL in this sentence.
OpenCL is like graphics shader languages: a foreign language to the
host. From the host point-of-view it is just a host foreign API managing
memory allocation on the device and controlling kernel execution on some
devices (think RPC). The advantage is that you can use OpenCL from a
COBOL host program if you want but this is another story... :-)
-- 
  Ronan KERYELL


More information about the llvm-dev mailing list