Hacker News new | ask | show | jobs
by MaxBarraclough 3075 days ago
> annoying boilerplate just to pass parameter values, map buffers, copy results out, etc. Sure it's all straightforward to write, but it's friction

Agree. It's quite a lot of work to orchestrate even a simple kernel.

> I assume it's free to do either

Looks that way - it seems AMD's engine lets you configure it. There are bunch of 'non-native' representations:

* the OpenCL C source itself (which may end up getting stored in the ELF)

* LLVM IR

* AMDIL (based on LLVM IR but not identical)

* HSAIL (again, like LLVM IR but not identical)

* SPIR (yet again, except that later versions of this IR aren't directly based on LLVM)

http://openwall.info/wiki/john/development/AMD-IL

The poorly-documented "-fbin-exe" flag gets you the real native code.

http://developer.amd.com/wordpress/media/2013/07/AMD_Acceler...

I believe there's a way to get it to build for GPUs other than your own. Whether it's exposed through the API, I'm not sure, but I'm fairly sure it can be done with the dev tools.

(That took quite a bit of digging, which I suppose proves your point.)