CUDA support in CLANG compiler V3.8


I just came across this little gem in the release notes for the CLANG compiler 3.8

How is it possible for a third party to add support for CUDA compilation without the involvement of nVidia? Has anyone tried this yet?


How do we know NVIDIA was not somehow involved in this effort? Even if there was no involvement from NVIDIA at all, it seems to me that NVIDIA has provides enough documented interfaces to enable a third party project of this nature. Presumably anything below PTX level will still be handled by NVIDIA software.

The usual route would have been nVidia offering a new CUDA toolkit with additional support for CLANG as a host compiler.

The fact that suddenly a new host compiler appears with internal support for the CUDA toolkit is kind of unexpected. ;)

Anyway I’ve already downloaded and installed the current Kubuntu 16.04 LTS developer version to try this. Supposedly this release includes CLANG 3.8, as well as some cutting edge gcc versions.

NVIDIA aim is to sell GPUs. From that perspective, offering a sufficient number of software building blocks that allow third parties to independently extend the GPU computing ecosystem seems like a beneficial strategy. This latest CLANG development would appear to play right into such a strategy.

Another aspect may be that, to my knowledge, Apple is heavily involved in the development of CLANG. If so, historical precedent shows that Apple likes to control the technologies it uses, and may therefore be highly interested in a GPU compute solution with reduces the reliance on NVIDIA’s efforts, especially since Apple’s OpenCL approach enjoys only tepid support.

This is all just speculation, of course.