[Insight-users] ITK on Cell Broadband Engine

Blezek, Daniel J., Ph.D. Blezek.Daniel at mayo.edu
Wed May 14 10:14:43 EDT 2008


Hi Daniele,

  I am heading up the technical part of the Mayo lab.  The application
described in the technical report was indeed a port if the ITK
algorithm, using ITK to validate the results of the Cell code.

  In your example, the Cell SDK makefile helpers compile "hello_spu.c"
into "hello_spu.o" then make the libhello_spu.a library.  This is raw
object code to run on the SPU.  The "hello_be1.c" code runs on the PPU,
loading the routines in hello_spu.c on the SPU as needed.  In essence,
two executables are created in the compile and combined into one PPU
executable.  Bear in mind that the SDK is for x86 Linux.  You can follow
some of the CMake threads for cross-compiling for tips:
http://www.cmake.org/Wiki/CMake_Cross_Compiling

  Andre has written a nice set of macros for CMake that automates much
of this process, removing the burdens.  I'm hopeful that he will release
them, and I could contribute them to CMake.

  I would suggest only building ITK for the PPU, I'm skeptical of SPU
performance for such a large and complex library.

Best regards,
-dan

-----Original Message-----
From: insight-users-bounces at itk.org
[mailto:insight-users-bounces at itk.org] On Behalf Of Daniele Domenichelli
Sent: Wednesday, May 14, 2008 8:49 AM
To: insight-users at itk.org
Subject: Re: [Insight-users] ITK on Cell Broadband Engine

Sorry, this reply was supposed to be sent to the mailing list, not only
to Luis...

---

Hello Luis,

At the moment I'm just doing some tests on the simulator, but we'll have
soon at the University of Genoa, Italy a blade QS21 (2 processor with 1
PPU and 8 SPU each). It will run Linux and I think I will try to compile
code with both gcc and xlc (IBM compiler for Cell BE).

Searching for "itk ibm cell" on google I found some presentations by
Mayo Clinic (for example
http://www-03.ibm.com/technology/cell/pdf/IBM_Mayo_Demo.pdf) but I could
not understand if they used ITK or not in their final application.


I'd try to compile CMake on the simulator but it will take a very long
time, because it is really slow. I'll try as soon as the blade is ready.
It should compile, as the ppu is just a PowerPC. Anyway I don't know if
CMake can be used, IBM uses two different toolchains for ppu and spu
code and Makefiles are really simple:

# spu dir Makefile
PROGRAM_spu   := hello_spu
LIBRARY_embed := hello_spu.a
include $(CELL_TOP)/buildutils/make.footer

# ppu dir Makefile
DIRS = spu
PROGRAM_ppu = hello_be1
IMPORTS = spu/hello_spu.a -lspe2 -lpthread include
$(CELL_TOP)/buildutils/make.footer

(I don't have "make.footer" at the moment, but I can get it if you wish
to see it).

There is probabily some work to do on CMake to make it work for both ppu
and spu and for linking spu-executables in ppu-executable.
Or maybe it can be handled with ADD_CUSTOM_COMMAND, as suggested in the
thread.
There should also be a way to load external spu-executables or maybe I
could build it just to compile ITK then use Makefiles instead of CMake
for my application.

Do you think that ITK should be build twice (for ppu and for spu) or
just for ppu?


Regards,
Daniele




2008/5/12 Luis Ibanez <luis.ibanez at kitware.com>:
>
>  Hi Daniele,
>
>  This sounds quite interesting.
>
>  Are you using a Playstation3 for this ?
>  or another IBM cell based machine ?
>
>  Can we assume that you are running Linux in this machine  and that 
> you are planning to use gcc ?
>
>  The first thing to try is building CMake on this machine.
>
>  You may want to look at the following discussion trail  in the CMake 
> List:
>
>  http://www.cmake.org/pipermail/cmake/2008-January/018934.html
>
>
>    Regards,
>
>
>       Luis
>
>
>  ------------------------------
>  Daniele Domenichelli wrote:
>
> >
> >
> >
> > Hello,
> >
> > I'm starting to develop an imaging application that will run on IBM 
> > Cell
> BE.
> > I successfully used ITK for some applications, so I was guessing if 
> > I could use them on that architecture.
> > Anyone tried to use or to optimize any ITK algorithms on Cell?
> >
> >
> > Thanks,
> > Daniele Domenichelli
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list