<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 2:54 PM, Sam Halliday <span dir="ltr"><<a href="mailto:sam.halliday@gmail.com" target="_blank">sam.halliday@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Jan,<br>
<br>
This is what it comes up with<br>
<a href="https://gist.github.com/fommil/c97d4c8fb2790e28ecaf8d334ebf1746" rel="noreferrer" target="_blank">https://gist.github.com/<wbr>fommil/<wbr>c97d4c8fb2790e28ecaf8d334ebf17<wbr>46</a><br>
<br>
Are there any demo apps I could expect to run with this? What is<br>
involved in writing missing functionality?<br></blockquote><div><br></div><div>I'll let others address the demo apps question for the most part. I know tstellard has worked with opencv compatibility a bit, I had previously tried GEGL, attempted luxmark/juliaGPU, and some of the FinanceBench that Phoronix uses is runnable. I previously ran BFGMiner for bitcoin mining as well.<br><br>Things you can try to do to improve the current situation:<br><br></div><div>1) If an application fails to compile CL kernels, it'd be good to get build logs and kernels so that the cause can be investigated. Often, the issue is because clover/libclc don't have an implementation of that functionality.<br><br></div><div>You can dump the list of kernels and the LLVM IR when a program runs by doing the following:<br>CLOVER_DEBUG_FILE=clover_dump CLOVER_DEBUG=clc,llvm,asm PATH_TO_YOUR_TEST_PROGRAM<br><br></div><div>That'll generate a set of files called <a href="http://clover_dump.cl">clover_dump.cl</a>, clover_dump.ll, clover_dump.asm with:<br></div><div>a) The CL source that the program tried to compile<br></div><div>b) The LLVM IR for the CL source.<br></div><div>c) The generated machine code for the LLVM IR on your card.<br><br></div><div>If the CL source is missing built-in function implementations, libclc (<a href="http://libclc.llvm.org">libclc.llvm.org</a>) will gladly accept patches to implement them.<br><br></div><div>If you want to just do a test-compile of the CL source, I use the following command (with libclc/llvm/mesa all in /usr/local/):<br>clang -S -emit-llvm -o $1.ll -include /usr/local/include/clc/clc.h -I/usr/local/include/ -Dcl_clang_storage_class_specifiers -target amdgcn-- -mcpu=pitcairn -c $1<br></div><div><br></div><div>2) If the application crashes outright (such as CLBlast), it could be because we are missing CL API functions that should be implemented, or because the program is abusing the spec.<br><br></div><div>My general thought is that it's most rewarding to pick an application that you want to see working, and then keep fixing things until it runs.<br><br></div><div>That mostly has meant implementing libclc built-ins for me. I've been working on getting MultiCoreWare's cppamp driver working on Mesa/Clover (<a href="https://bitbucket.org/multicoreware/hcc/wiki/Home">https://bitbucket.org/multicoreware/hcc/wiki/Home</a>). We're only 4-ish built-ins (and a static keyword from CL 1.2's storage class specifiers) away from that working, which would be nice.<br><br></div><div>Beyond cppamp, I'd be interested in someone tracking down more precision tests for the floating point and geometric functions that we haven't implemented yet and turning those into piglit tests (or at least identifying projects that have those tests and how to build/run them).<br></div><div><br></div><div>--Aaron<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Number of platforms 1<br>
Platform Name Clover<br>
Platform Vendor Mesa<br>
Platform Version OpenCL 1.1 Mesa 12.0.1<br>
Platform Profile FULL_PROFILE<br>
Platform Extensions cl_khr_icd<br>
Platform Extensions function suffix MESA<br>
Platform Name Clover<br>
Number of devices 1<br>
Device Name AMD HAWAII (DRM 2.43.0 / 4.6.4-1-ARCH, LLVM 3.8.0)<br>
Device Vendor AMD<br>
Device Vendor ID 0x1002<br>
Device Version OpenCL 1.1 Mesa 12.0.1<br>
Driver Version 12.0.1<br>
Device OpenCL C Version OpenCL C 1.1<br>
Device Type GPU<br>
Device Profile FULL_PROFILE<br>
Max compute units 44<br>
Max clock frequency 1090MHz<br>
Max work item dimensions 3<br>
Max work item sizes 256x256x256<br>
Max work group size 256<br>
Preferred work group size multiple 64<br>
Preferred / native vector sizes<br>
char 16 / 16<br>
short 8 / 8<br>
int 4 / 4<br>
long 2 / 2<br>
half 0 / 0 (n/a)<br>
float 4 / 4<br>
double 2 / 2 (cl_khr_fp64)<br>
Half-precision Floating-point support (n/a)<br>
Single-precision Floating-point support (core)<br>
Denormals No<br>
Infinity and NANs Yes<br>
Round to nearest Yes<br>
Round to zero No<br>
Round to infinity No<br>
IEEE754-2008 fused multiply-add No<br>
Support is emulated in software No<br>
Correctly-rounded divide and sqrt operations No<br>
Double-precision Floating-point support (cl_khr_fp64)<br>
Denormals Yes<br>
Infinity and NANs Yes<br>
Round to nearest Yes<br>
Round to zero Yes<br>
Round to infinity Yes<br>
IEEE754-2008 fused multiply-add Yes<br>
Support is emulated in software No<br>
Correctly-rounded divide and sqrt operations No<br>
Address bits 32, Little-Endian<br>
Global memory size 1073741824 (1024MiB)<br>
Error Correction support No<br>
Max memory allocation 268435456 (256MiB)<br>
Unified memory for Host and Device Yes<br>
Minimum alignment for any data type 128 bytes<br>
Alignment of base address 1024 bits (128 bytes)<br>
Global Memory cache type None<br>
Image support No<br>
Local memory type Local<br>
Local memory size 32768 (32KiB)<br>
Max constant buffer size 268435456 (256MiB)<br>
Max number of constant args 16<br>
Max size of kernel argument 1024<br>
Queue properties<br>
Out-of-order execution No<br>
Profiling Yes<br>
Profiling timer resolution 0ns<br>
Execution capabilities<br>
Run OpenCL kernels Yes<br>
Run native kernels No<br>
Device Available Yes<br>
Compiler Available Yes<br>
Device Extensions cl_khr_global_int32_base_<wbr>atomics<br>
cl_khr_global_int32_extended_<wbr>atomics cl_khr_local_int32_base_<wbr>atomics<br>
cl_khr_local_int32_extended_<wbr>atomics cl_khr_byte_addressable_store<br>
cl_khr_fp64<br>
NULL platform behavior<br>
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Clover<br>
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [MESA]<br>
clCreateContext(NULL, ...) [default] Success [MESA]<br>
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform<br>
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)<br>
Platform Name Clover<br>
Device Name AMD HAWAII (DRM 2.43.0 / 4.6.4-1-ARCH, LLVM 3.8.0)<br>
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices<br>
found in platform<br>
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found<br>
in platform<br>
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)<br>
Platform Name Clover<br>
Device Name AMD HAWAII (DRM 2.43.0 / 4.6.4-1-ARCH, LLVM 3.8.0)<br>
ICD loader properties<br>
ICD loader Name OpenCL ICD Loader<br>
ICD loader Vendor OCL Icd free software<br>
ICD loader Version 2.2.9<br>
ICD loader Profile OpenCL 2.1<br>
<div class=""><div class="h5"><br>
On 3 August 2016 at 21:33, Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu">jan.vesely@rutgers.edu</a>> wrote:<br>
> Hi,<br>
><br>
> you can use clinfo utility to check whether OpenCL has been setup<br>
> correctly. It won't be able to run luxmark, but simpler stuff should<br>
> work.<br>
><br>
> Jan<br>
><br>
> On Wed, 2016-08-03 at 20:45 +0100, Sam Halliday wrote:<br>
>> Hello everybody,<br>
>><br>
>> I recently got a Radeon R9 290x (aka Hawaii). I run ArchLinux, which<br>
>> has<br>
>> mesa 12.0.1.<br>
>><br>
>> I am keen to try out mesa's partial OpenCL implementation. Ideally to<br>
>> use a BLAS implementation such as <a href="https://github.com/CNugteren/CLBlas" rel="noreferrer" target="_blank">https://github.com/CNugteren/<wbr>CLBlas</a><br>
>> t<br>
>> but I'd also be happy to just write something basic like dense<br>
>> matrix/matrix multiplication in OpenCL.<br>
>><br>
>><br>
>> However, when I tried to run the "luxmark" OpenCL benchmark (the only<br>
>> way I could think to test if my card is supported), I got this error<br>
>><br>
>> [PathOCLBaseRenderThread::0] Compiling kernels<br>
>> [PathOCLBaseRenderThread::0] PathOCL kernel compilation error ERROR<br>
>> clBuildProgram[CL_INVALID_<wbr>BUILD_OPTIONS]:<br>
>> RUNTIME ERROR: PathOCLBase kernel compilation error<br>
>><br>
>> which, I'm guessing, means that my GPU isn't supported for OpenCL by<br>
>> mesa yet. Is that correct? (I don't know how to get any more output<br>
>> or<br>
>> logs than this).<br>
>><br>
>><br>
>> Could somebody please help by letting me know if there is a ticket I<br>
>> could subscribe to track progress of support for my card (a simple<br>
>> search of the bug database didn't bring up anything obvious). This<br>
>> message is to the -dev list, so I am suppose I am saying that I am<br>
>> prepared to get my hands dirty... but I am primarily a Scala<br>
>> developer<br>
>> and haven't done any C in years so the extent of my help is limited.<br>
>><br>
>> If somebody who knows what they are doing would be willing to<br>
>> implement<br>
>> some of the functionality needed, I'd be prepared to buy this GPU for<br>
>> them to use for their hacking - it's the least I could do (but it is<br>
>> an<br>
>> absolute monster, I didn't even know GPUs could be this big! I needed<br>
>> to<br>
>> get a bigger case for it).<br>
>><br>
>><br>
>> Somewhat tangentially, if OpenCL support is really not a possibility<br>
>> anytime soon, could somebody please point me in the direction of a<br>
>> way<br>
>> to use this card programmatically for something like matrix/matrix<br>
>> multiplication? (I'm prepared to go really low level if there is<br>
>> sufficient documentation).<br>
>><br>
>><br>
>> I'm not at all interested in using proprietary drivers for OpenCL.<br>
>><br>
>><br>
> --<br>
> Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu">jan.vesely@rutgers.edu</a>><br>
</div></div><div class=""><div class="h5">______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div></div>