-
Notifications
You must be signed in to change notification settings - Fork 549
Closed
Description
I have an AMD Radeon running on Fedora 31, its device signature is:
Clover: Radeon RX 580 Series (POLARIS10, DRM 3.36.0, 5.5.8-200.fc31.x86_64, LLVM 9.0.0), 8192 MB
However running a number of examples like "surface_opencl" (master branch as of now) produces this kind of error:
ArrayFire v3.8.0 (OpenCL, 64-bit Linux, build bc37e8a)
[0] Clover: Radeon RX 580 Series (POLARIS10, DRM 3.36.0, 5.5.8-200.fc31.x86_64, LLVM 9.0.0), 8192 MB
Cannot open file 1/KER17252040479444784050.cl
Cannot open file 1/KER7820264272521714025.cl
Cannot open file 1/KER5090553150507457729.cl
Cannot open file 1/KER15803858198028938426.cl
Cannot open file 1/KER6403184010839580536.cl
Cannot open file 1/KER5651956347504768133.cl
In file included from <built-in>:1:
In file included from /usr/include/clc/clc.h:31:
/usr/include/clc/workitem/get_global_size.h:1:39: error: expected ')'
<command line>:4:13: note: expanded from here
/usr/include/clc/workitem/get_global_size.h:1:33: note: to match this '('
In file included from <built-in>:1:
In file included from /usr/include/clc/clc.h:32:
/usr/include/clc/workitem/get_global_id.h:1:37: error: expected ')'
<command line>:4:13: note: expanded from here
/usr/include/clc/workitem/get_global_id.h:1:31: note: to match this '('
In file included from <built-in>:1:
In file included from /usr/include/clc/clc.h:33:
/usr/include/clc/workitem/get_local_size.h:1:38: error: expected ')'
<command line>:4:13: note: expanded from here
/usr/include/clc/workitem/get_local_size.h:1:32: note: to match this '('
In file included from <built-in>:1:
In file included from /usr/include/clc/clc.h:34:
/usr/include/clc/workitem/get_local_id.h:1:36: error: expected ')'
<command line>:4:13: note: expanded from here
/usr/include/clc/workitem/get_local_id.h:1:30: note: to match this '('
In file included from <built-in>:1:
In file included from /usr/include/clc/clc.h:35:
/usr/include/clc/workitem/get_num_groups.h:1:38: error: expected ')'
<command line>:4:13: note: expanded from here
/usr/include/clc/workitem/get_num_groups.h:1:32: note: to match this '('
In file included from <built-in>:1:
In file included from /usr/include/clc/clc.h:36:
/usr/include/clc/workitem/get_group_id.h:1:36: error: expected ')'
<command line>:4:13: note: expanded from here
/usr/include/clc/workitem/get_group_id.h:1:30: note: to match this '('
In file included from <built-in>:1:
In file included from /usr/include/clc/clc.h:37:
/usr/include/clc/workitem/get_global_offset.h:1:41: error: expected ')'
<command line>:4:13: note: expanded from here
/usr/include/clc/workitem/get_global_offset.h:1:35: note: to match this '('
input.cl:72:26: warning: initializing '__global float *' with an expression of type 'const __global float *' discards qualifiers
-cl-std=CL1.1 -D dim_t=long -D To=float -D Ti=float -D dim=0
OpenCL Error (-11): Build Program Failure when calling clBuildProgram
ArrayFire Exception (Internal error:998):
OpenCL Error (-11): Build Program Failure when calling clBuildProgram
In function void af::Window::surface(const af::array&, const af::array&, const af::array&, const char*)
In file src/api/cpp/graphics.cpp:126
terminate called after throwing an instance of 'af::exception'
what(): ArrayFire Exception (Internal error:998):
OpenCL Error (-11): Build Program Failure when calling clBuildProgram
In function void af::Window::surface(const af::array&, const af::array&, const af::array&, const char*)
In file src/api/cpp/graphics.cpp:126
Aborted (core dumped)
This seems to be related to this compiler argument "-D dim=0" and that lne in a OpenCL include file for example:
_CLC_DECL size_t get_global_size(uint dim);
It is clear that it should yield a compile error. Maybe ArrayFire should use better mangled macro name like "af_dim_opencl" or something else... ?
Best regards.
Reactions are currently unavailable