Re: Barbeque and SVC integration

2 views
Skip to first unread message

Patrick Bellasi

unread,
Apr 10, 2013, 12:14:05 PM4/10/13
to Jens Brandenburg, bosp-...@googlegroups.com, Germain HAUGOU



On Wed, Apr 10, 2013 at 5:10 PM, Jens Brandenburg <jens.bra...@hhi.fraunhofer.de> wrote:
Unless you are comming up with another approach I think I am done.

Another possible integration strategy is:
1. compile you stand-alone application, which is plain C and MIND code, as a library, i.e.
 a. removing the main function
 b. exposing 3 C coded methods: onConfigure, onRun, onMonitor
     ... these C coded methods will implement what you usually put in C++ code to integrate the app with the RTLib
 c. this library will be compiled with your usual toolchiain, GCC compiler and MIND compiler
2. setup a dummy RTLib based application, for example you could simple modifying the demoapp provided with BOSP
  a. you could find it under contrib/demoapp
  b. empty the onXXX methods
  c. place into each onXXX method a call to your dual C coded onXXX method, which are exposed by the library
  d. add your C code library as a dependency for this project, i.e.
      look into src/CMakeLists.txt and add the dependency to the definition of "target_link_libraries", right after "${Boost_LIBRARIES}"
  e. compile this piece of code using the BOSP building system, i.e.
      enable the demoapp in the menuconfig and run a make

This should work and you should get:
1. your C/MIND coded library
2. an application linking both RTLib and your C/MIND coded library

Deploy both on the emaulator... and try to start the application by pre-loading your C/MIND coded/compiled library

 
Given the fact that we are running out of time, we should envision a prototype without the Barbeque integration as a fall-back solution. SVC is running in the simulator in all configurations, eg. posix-posix, posix-iss, arm-iss. You can change the reconstruction layer at startup time but also during runtime. We can use this to perform measurements for power consumption, e.g. decoding 1 layer with 4 pe's and 3 layers with 16 pe's. We can also provide some profiling results from the simulator to be shown with NoCTrace. Also the dmm stuff is integrated, but I doubt that we are able to integrate Barbeque within the given time-frame. Of course I can send you the source code of the SVC decoder. Maybe you have an better idea.

I really think that if we miss BBQ integration we miss an interesting integration opportunity, since this is the only use-case where we have the change to show a (even if simple) power management policy.
 

Best regards,
Jens

Ciao Patrick

--
#include <best/regards.h>

Patrick Bellasi
Post-Doc at Politecnico di Milano
http://home.dei.polimi.it/bellasi

Patrick Bellasi

unread,
Apr 11, 2013, 1:33:45 PM4/11/13
to Jens Brandenburg, bosp-...@googlegroups.com, Germain HAUGOU



On Thu, Apr 11, 2013 at 5:53 PM, Jens Brandenburg <jens.bra...@hhi.fraunhofer.de> wrote:
Hi,


Hi Jens!
 
okay I have created a library with the interface you suggested. I will now try to integrate this library into "rtlib-testapp".

Good!
 
It is not fully clear to me how the linking will work. Do I have to add my library to the installation package e.g. update.zip, or will it be part of the "bbque-testapp" application?

First of all just ensure to properly link your library with the testapp... which requires to add the library as a dependency to the CMakeList file as I've indicated yesterday, i.e. edit:
<BOSP>/contrib/rtlib-testapp/src/CMakeLists.txt
to have something like:
target_link_libraries(
        bbque-testapp
        ${Boost_LIBRARIES}
        ${BBQUE_RTLIB_LIBRARY}
        SvcDec
)

Note that you have to remove prefix (lib) and suffix (.so)

To have the compiler find your library, please ensure to have it deployed under:
<BOSP>/out/lib/
before running the compilation.
 
If I have to add the "libSvcDec.so" file, do I need additional stuff.

If you need to add something into the update.zip file just ensure:
1. to have everything copied into the <BOSP>/out folder,
e.g. put your library under
<BOSP>/out/lib/libSvcDec.so
2. add the user execution flag to _all_ files you want to be copied into the update.zip file,
e.g. chmod 500 <BOSP>/out/lib/libSvcDec.so

Indeed, for the time being, the only easy way to add custom contents to the update.zip is to set the user execution flag to a file.

Tu run the application you could exploit the LD_PRELOAD trick to point your library as well as the RTLib.

 
Because this file can be found in the host folder and I assume the fabric part is not integrated into the ".so". So please can you specify, which parts of my "build/gepop_arm_iss/" build results I have to add to the installation image and where to locate this stuff.

Regarding this point you should check with Germain, I'm not an expert at all in NPM.
Maybe it could be interesting to know that Edoardo, for its OpenCL application, is deploying everything under a dedicated folder which contains both host code and fabric compiled kernels. The host application is then in charge to notify the OpenCL library where to look for kernels to be deployed in the fabric... for OpenCL this is done setting properly an env variable or by specifying the absolute path to the API call which load kernels on the accelerator.
Probably something similar is required for NPM... but again, please check with Germain.
 

Best regards,
Jens

Ciao Patrick

Germain HAUGOU

unread,
Apr 12, 2013, 4:33:06 AM4/12/13
to Patrick Bellasi, Jens Brandenburg, bosp-...@googlegroups.com

Hi Jens,

 

for what concerns the fabric binaries, you can put them where you want. The only thing is that the path where you put them should corresponds to the path that you give when you deploy your components. Usually we are specifying paths relative to the build directory so that it is easier to make it work between the different platforms. I think it is also your case. If yes, you just need to make sure that your binaries (all the .so files I think) are in the directory where you launch your application.

 

Best regards,

Germain

Reply all
Reply to author
Forward
0 new messages