cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
559 Views
Registered: ‎06-10-2018

SDSoC OpenCL Command Line Emulation Flow.

Jump to solution

Hi,

Is there any reference for performing software emulation of OpenCL application using command line interface in SDSoC environment?

I can find information for command line emulation of C/C++ applications, but facing some issues with command line emulation of OpenCL applications.

Steps followed for emulation of provided vector addition OpenCL example on SDSoC examples github page: -

-------------

1) Build host and target binaries using provided Makefile with change of target to sw_emu.

2) Include a line in sd_crd.manifest to pack executable host binary ("vadd" executable file in this case) also in SD card image.

Not sure why this was not included by default, but OpenCL emulation flow for SDAccel and OpenCL execution in general requires only single executable (something like built "vadd") to be executed from command line.

3) Start QEMU by using sdsoc_emulator with "-runtime ocl" option.

4) Try executing included executable vadd from inside QEMU (now avialable in /mnt directory) . It doesn't execute and QEMU complains about ELF format mismatch (still "vadd" is arm executable that is being attempted to run on qemu-system-aarch64)..

-------------

Questions

-------

Q1) Why host executable is not mentioned in sd_card.manifest file in the provided build flow for sw_emu?

 

Q2) What is correct way of running generated host and kernel binaries on QEMU started with "sdsoc_emulator -runtime ocl"? Is there another process  that needs to emulator or executable can be run from inside QEMU?

 

Best,

Sumit

 

1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
503 Views
Registered: ‎06-10-2018

Re: SDSoC OpenCL Command Line Emulation Flow.

Jump to solution

Regarding my  Q2), found that executable can be run from inside QEMU. I was facing problem because I modified Makefile provided with 1 example that was meant for ZCU102 platform. Although I did change target platform to my desired one before, but arm compiler for host code compilation needed to change as well. With arm compiler change, I could get SDSoC OpenCL command line emulation to work fine.

 

Regarding my Q1, answer carries less significance for me right now.

 

Marking this as resolved from my side.

 

View solution in original post

0 Kudos
1 Reply
Highlighted
Visitor
Visitor
504 Views
Registered: ‎06-10-2018

Re: SDSoC OpenCL Command Line Emulation Flow.

Jump to solution

Regarding my  Q2), found that executable can be run from inside QEMU. I was facing problem because I modified Makefile provided with 1 example that was meant for ZCU102 platform. Although I did change target platform to my desired one before, but arm compiler for host code compilation needed to change as well. With arm compiler change, I could get SDSoC OpenCL command line emulation to work fine.

 

Regarding my Q1, answer carries less significance for me right now.

 

Marking this as resolved from my side.

 

View solution in original post

0 Kudos