[Bug 100105] Make Theano OpenCL support work on Clover and RadeonSI

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Sep 18 22:55:21 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=100105

--- Comment #1 from Jan Vesely <jan.vesely at rutgers.edu> ---
*** Testing for AMD Radeon R7 Graphics (CARRIZO / DRM 3.18.0 / 4.11.0-ROC, LLVM
5.0.0)

Ran 6670 tests in 785.274s

FAILED (SKIP=12, errors=580, failures=12)

all errors are caused by:
TypeError: This is for CUDA arrays.

I haven't investigated the failures.


There are couple of patches needed:
https://github.com/Theano/libgpuarray/pull/534
https://github.com/Theano/libgpuarray/pull/535

http://lists.llvm.org/pipermail/libclc-dev/2017-September/002449.html

and:
diff --git a/src/cluda_opencl.h b/src/cluda_opencl.h
index 6e0095c..e93aa8b 100644
--- a/src/cluda_opencl.h
+++ b/src/cluda_opencl.h
@@ -48,9 +48,9 @@ typedef struct _ga_half {
 } ga_half;

 #define ga_half2float(p) vload_half(0, &((p).data))
-static inline ga_half ga_float2half(ga_float f) {
+inline ga_half ga_float2half(ga_float f) {
   ga_half r;
-  vstore_half_rtn(f, 0, &r.data);
+  vstore_half(f, 0, &r.data);
   return r;
 }
diff --git a/src/gpuarray_buffer_opencl.c b/src/gpuarray_buffer_opencl.c
index 8f12811..2041ca2 100644
--- a/src/gpuarray_buffer_opencl.c
+++ b/src/gpuarray_buffer_opencl.c
@@ -146,7 +146,7 @@ cl_ctx *cl_make_ctx(cl_context ctx, gpucontext_props *p) {
   CL_CHECKN(global_err, clGetDeviceInfo(id, CL_DEVICE_VERSION,
                                         device_version_size,
                                         device_version, NULL));
-  if (device_version[7] == '1' && device_version[9] < '2') {
+  if (device_version[7] == '1' && device_version[9] < '1') {
     error_set(global_err, GA_UNSUPPORTED_ERROR,
               "We only support OpenCL 1.2 and up");
     return NULL;

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170918/96310207/attachment.html>


More information about the dri-devel mailing list