Hacker News new | ask | show | jobs
by markus2012 3898 days ago
What bout HSAIL / LLVM: https://github.com/HSAFoundation/HLC-HSAIL-Development-LLVM

(HSA Intermediate Language LLVM support)

It would seem an IR is already available and it's already integrated on an existing LLVM branch. From skimming around it seems AMD has been working hard to do what is necessary to get things merged into LLVM mainline.

<quote> My highest priority is to get the backend upstreamed as soon as possible, so I would appreciate feedback about any kinds of blocking issues on that.

Thanks

Matt Arsenault </quote>

http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-May/085545.h...

1 comments

I'm sure this work hasn't gone unnoticed in SPIR-V development, I wouldn't even be surprised if it's partially the same guys doing it. That said, I haven't been involved in that so I don't know for sure.

LLVM IR has a few weak points for this kind of IR. It has architecture dependent parts and the format has changed in the past so it is coupled to LLVM development cycles. You can argue whether that's a good or bad thing but it's a thing to be considered.

There were two earlier versions of SPIR, coupled with different LLVM versions. SPIR-V is independent of LLVM but still semantically similar to LLVM IR, so compiling back and forth between the two isn't too difficult. AFAIK there has been discussions about adding a SPIR-V backend to LLVM trunk (can't find the mailing lists).

The SPIR-V spec is already out and there has been some projects already using it, although you can't run it on a GPU yet (unless you work for a GPU vendor, that is).

https://www.khronos.org/spir