11-13-2019 02:54 AM - edited 11-13-2019 01:01 PM
I have recently downloaded Vitis and I have created XST platform with interfaces (like in sdsoc). And now Im stuck. How can I Make Vititis to accelerate function like in SDSoC because it seems that it doesnt have that option implemented (I couldn't find any way to accelerate SW function)?
Thanks for feedback
PS. I have found that vitis is creating non-accelerable project so the real question is how can I make accelerable project?
11-14-2019 01:18 PM
Hi @bartokon, you may want to run through the SDSoC to Vitis Migration Guide here:
But let us know if you still have issues with accerating the function.
11-16-2019 08:30 AM
Thanks for reply.
I have read the information about openCL and followed the steps that you linked.
Now I'm trying to compile a basic program with openCL but another problem has occured.
I have created petalinux platform and linked my libraries, but the compilator gave me an error "/usr/include/CL/cl2.hpp:495:2: error: #error Visual studio 2013 or another C++11-supporting compiler required", I have tried adding libaries like these (screen shots) and added flag -std=c++0x but compilation have failed giving an error "cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C", also compiler gives me an error about namespaces "/usr/include/CL/cl2.hpp:677:1: error: unknown type name ‘namespace’", /usr/include/c++/7/bits/stl_vector.h:68:1: error: unknown type name ‘namespace’ and similar.
Could you tell me how can I change to compiler that supports C++11 and make it compile properly?
Thanks for support!
11-16-2019 11:08 AM
I have found out that I need aarch64-linux-gnu-g++ compiler but it seems that Vitis doesn't have one included? I have changed toolchains and I couldn't find "aarch64-linux-gnu-g++" only "aarch64-linux-gnu-gcc"
On the other hand SDSoC had them included after changing toolchain to Xilinx ARM v8 GNU/Linux Toolchain.
Is there any guide how can I set up Vitis for openCL building from scratch step by step?
Thank you for your patience.
11-17-2019 03:08 PM
I have made some progress on this matter, this fixed problems with compiler and switched to V8 Arm GNU/Linux toolchain
sudo apt-get install g++-arm-linux-gnueabihf
sudo apt-get install g++-arm-linux-gnueabi
and now after I added -lOpenCL it says "/home/bartek/HardDrive/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: cannot find -lOpenCL"
Without this -lOpenCL it gaves me an error like this "/home/bartek/HardDrive/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: ./src/main.o: in function `cl::detail::ReferenceHandler<_cl_device_id*>::release(_cl_device_id*)':
/home/bartek/include/CL/cl2.hpp:1491: undefined reference to `clReleaseDevice'"
What should I do next to fix complitation error?
Thank you in advance for your help
11-18-2019 07:22 AM
Based on the messages, it may be the case that you don't have the required libraries installed/used.
For compilation, please check that the required switches are used for Arm, it mentions using -lxilinxopencl:
If it doesn't work, please check the installation instructions for the initial libraries needed (it mentions OpenCL):
Next, I would check if XRT is installed, as that also includes some libraries used for compilation:
Hopefully this helps get your compilation going!
11-19-2019 11:16 AM
I think that I have problem with platform (Zedboard's) not libraries...
I'm now following this tutorial (https://japan.xilinx.com/html_docs/xilinx2019_2/vitis_doc/Chunk1854106950.html#wxe1570652701297) to create working platform with petalinux and see if the problem is fixed.