UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor jhanani
Visitor
472 Views
Registered: ‎10-08-2018

Errors in SDAccel example while compiling with clang

Jump to solution

Hi,

I am new to this field. I tried to compile the OpenCL example provided by the SDAccel in clang and  I got the following errors:

 

/opt/Xilinx/SDx/2017.4.op/lnx64/tools/clang/bin/clang -I /opt/Xilinx/SDx/2017.4.op/runtime/include/1_2 -S -emit-llvm -o conv.ll -x cl krnl_convolve.cl
krnl_convolve.cl:48:9: error: unknown type name 'uint2'
typedef uint2 bus_t;
^
krnl_convolve.cl:121:6: error: use of undeclared identifier 'size_t'; did you mean 'sizeof'?
for(size_t i = 0; i < M(IMAGE_WIDTH*IMAGE_HEIGHT); i++) {
^
krnl_convolve.cl:121:20: error: use of undeclared identifier 'i'
for(size_t i = 0; i < M(IMAGE_WIDTH*IMAGE_HEIGHT); i++) {
^
krnl_convolve.cl:121:53: error: use of undeclared identifier 'i'
for(size_t i = 0; i < M(IMAGE_WIDTH*IMAGE_HEIGHT); i++) {
^
krnl_convolve.cl:125:22: error: use of undeclared identifier 'i'
bus_to_short(input[i], input_buf);
^
krnl_convolve.cl:128:7: error: use of undeclared identifier 'size_t'; did you mean 'sizeof'?
for(size_t y = 0; y < FILTER_HEIGHT-1; y++) {
^
krnl_convolve.cl:128:21: error: use of undeclared identifier 'y'
for(size_t y = 0; y < FILTER_HEIGHT-1; y++) {
^
krnl_convolve.cl:128:42: error: use of undeclared identifier 'y'
for(size_t y = 0; y < FILTER_HEIGHT-1; y++) {
^
krnl_convolve.cl:130:8: error: use of undeclared identifier 'size_t'; did you mean 'sizeof'?
for(size_t x = 0; x < REG_WIDTH - B; x++) {
^
krnl_convolve.cl:130:22: error: use of undeclared identifier 'x'
for(size_t x = 0; x < REG_WIDTH - B; x++) {
^
krnl_convolve.cl:130:41: error: use of undeclared identifier 'x'
for(size_t x = 0; x < REG_WIDTH - B; x++) {
^
krnl_convolve.cl:131:14: error: use of undeclared identifier 'y'
line_reg[y][x] = line_reg[y][x+B];
^
krnl_convolve.cl:131:17: error: use of undeclared identifier 'x'
line_reg[y][x] = line_reg[y][x+B];
^
krnl_convolve.cl:131:31: error: use of undeclared identifier 'y'
line_reg[y][x] = line_reg[y][x+B];
^
krnl_convolve.cl:131:34: error: use of undeclared identifier 'x'
line_reg[y][x] = line_reg[y][x+B];
^
krnl_convolve.cl:134:8: error: use of undeclared identifier 'size_t'; did you mean 'sizeof'?
for(size_t j = 0; j < B; j++) {
^
krnl_convolve.cl:134:22: error: use of undeclared identifier 'j'
for(size_t j = 0; j < B; j++) {
^
krnl_convolve.cl:134:29: error: use of undeclared identifier 'j'
for(size_t j = 0; j < B; j++) {
^
krnl_convolve.cl:135:14: error: use of undeclared identifier 'y'
line_reg[y][(REG_WIDTH - B) + j] = line_buf[y][j + B*(i %...
^

I included CL/cl.h in the opencl file and added the include files as well, but it didn't work for me. I  would like to know if there is any other library that can be added to solve this errors?

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
427 Views
Registered: ‎03-24-2010

Re: Errors in SDAccel example while compiling with clang

Jump to solution

This flow is not officially supported.

Regards,
brucey
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
2 Replies
Xilinx Employee
Xilinx Employee
428 Views
Registered: ‎03-24-2010

Re: Errors in SDAccel example while compiling with clang

Jump to solution

This flow is not officially supported.

Regards,
brucey
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
Visitor jhanani
Visitor
394 Views
Registered: ‎10-08-2018

Re: Errors in SDAccel example while compiling with clang

Jump to solution

Is it possible to generate CFG for OpenCL example provided by Xilinx SDAccel?

0 Kudos