[llvm-dev] [OpenCL][AMDGPU] Using AMDGPU generated kernel code for OpenCL

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Tue May 9 06:49:05 PDT 2017


The binary format expected by AMD OpenCL drivers are elf-linked binaries. See

http://openwall.info/wiki/john/development/AMD-IL
https://community.amd.com/thread/166955

Michael


2017-05-08 11:43 GMT+02:00 Philipp Schaad via llvm-dev
<llvm-dev at lists.llvm.org>:
> Hello everyone
>
> I was wondering, what the correct way of using an AMDGPU generated kernel
> code for OpenCL was. I am trying to provide Polly's GPGPU Code generation
> with the ability to run on different GPU devices, such as AMD GPUs.
>
> For NVIDIA, I simply retrieve a pre-compiled PTX string from the NVPTX
> backend and pass that to OpenCL's 'clCreateProgramWithBinary' function.
> However, when doing the same with the AMDGPU backend and its returned kernel
> string, OpenCL complains about an invalid binary.
> This has been tried with a number of different target triples (eg.
> 'amdgcn--', 'amdgcn-amd-amdhsa' etc), and my assumption so far is, that I am
> not trying the correct Triple.
> Or am I missing something entirely, and there have to be additional steps,
> to get the correct ELF binary?
>
> Thank you in advance for any help and pointers!
>
> Best,
> Philipp
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


More information about the llvm-dev mailing list