cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

wolf0
Adept I

Using LLVM to make a Polaris (Ellesmere) binary loadable by the OpenCL API

I've been using CLRadeonExtender, which doesn't support Polaris 10. I'd LOVE to use LLVM, but it seems that it's near impossible to figure out what to pass to it to get it to compile an OpenCL program and output an AMD binary for the target loadable by the OpenCL driver.

0 Likes
2 Replies
wolf0
Adept I

Turns out, there seem to be options that MAY produce such a binary... but clang-4.0 (from svn) crashes on linking:

1.    <eof> parser at end of file

2.    Code generation

3.    Running pass 'Function Pass Manager' on module '/mnt/3tb-secure/tmp/Ethereum/ethash-gcn/wolf-cn-clang.cl'.

4.    Running pass 'SI Fix SGPR copies' on function '@cn0'

clang-4.0: error: unable to execute command: Segmentation fault (core dumped)

clang-4.0: error: clang frontend command failed due to signal (use -v to see invocation)

clang version 4.0.0 (trunk 281716)

Target: amdgcn-fiji--

Thread model: posix

InstalledDir: /usr/bin

clang-4.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.

clang-4.0: note: diagnostic msg:

********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:

Preprocessed source(s) and associated run script(s) are located at:

clang-4.0: note: diagnostic msg: /tmp/wolf-cn-clang-026d14.cl

clang-4.0: note: diagnostic msg: /tmp/wolf-cn-clang-026d14.sh

clang-4.0: note: diagnostic msg:

********************

0 Likes

I was able to generate an OpenCL binary file for AMD's proprietary drivers with clang-5.0.0. I will release my compiler kit when I  have a chance.

0 Likes