[llvm-dev] SPIRV-LLVM as an external tool
Pierre Moreau via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 21 15:34:07 PST 2018
On 2018-02-21 — 14:55, Tom Stellard via llvm-dev wrote:
> On 02/21/2018 12:15 AM, Tomeu Vizoso via llvm-dev wrote:
> > Hi,
> >
> > for a few months already I have been asking around for opinions on how
> > people could best work together on Khronos' SPIR-V <-> LLVM-IR converter
> > and some consensus seems to have formed.
> >
> > Most of the people I talked to favored having the converter become an
> > external tool within the LLVM project, similar to libclc. I think that
> > the LLVM project's processes, infrastructure and community form the best
> > place for this collaboration to happen.
> >
> > I hope that having the converter as part of LLVM can help expand LLVM's
> > value proposition in heterogeneous computing, in part by complementing
> > the OpenCL C backend in clang.
> >
> > Thus I would like to ask what the LLVM community needs to see from us
> > before SPIRV-LLVM can be accepted as an external tool, if at all.
> >
>
> Does the external tool exist already? I recommend starting by posting
> the code publicly and then ensuring that going forward all development
> and discussions about the tool are happening in a public space.
The code is publicly available at https://github.com/pierremoreau/llvm-spirv.
It is based on https://github.com/KhronosGroup/SPIRV-LLVM/ and
https://github.com/thewilsonator/llvm-target-spirv/, stripped off of everything
not related to SPIR-V and updated to work with llvm HEAD.
(Some of the commits were lost on the way, so we are in the process of redoing
the stripping and updating.)
One user of that external tool will be Mesa [1] (for its OpenCL implementation
named clover) for
1. enabling clCreateProgramWithIL(KHR)? on AMD cards through clover, by
translating SPIR-V to LLVM IR; (patches under review [2])
2. allowing additional drivers (nouveau, freedreno, etnativ) to be supported by
clover, by compiling OpenCL C (via LLVM IR) to SPIR-V (and then translating
from SPIR-V to NIR).
Regards,
Pierre
[1]: https://www.mesa3d.org/
[2]: https://patchwork.freedesktop.org/series/38728/
> It's important to demonstrate that there is a developer community backing
> the tool and that it won't be abandoned if it is added as an llvm
> sub-project.
>
> -Tom
>
> > Thanks,
> >
> > Tomeu
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180222/691a2847/attachment.sig>
More information about the llvm-dev
mailing list