Professional Documents
Culture Documents
Architecture Overview: Introducing The Cell BE Installing Linux SIMD Programming in C/C++ Asynchronous Data Transfer With The DMA
Architecture Overview: Introducing The Cell BE Installing Linux SIMD Programming in C/C++ Asynchronous Data Transfer With The DMA
FOSDEM2008 olivier.grisel@ensta.org
WhoamI
PS3architectureoverview
CPU:IBMCell/BE@3.2GHz
GPU:NvidiaRSX
SystemBus:2.5GB/s
TheCellBroadbandEngine
1PPEcore@3.2GHz
8SPEcores@3.2GHz
PS3Clusters
PS3GRIDComputing
PS3GRIDproject
Folding@Home
LinuxonthePS3
Installapowerpc64smporps3kernel Installgccspu+libspe2
ProgrammingtheCell/BEinC
IntroductiontoSIMDprogramming
128bitsregisters(SSE2,Altivec,SPE)
SIMDprogrammingthebigpicture
NotalwaysSIMDizable
SIMDprogrammingwithlibspe2and gccspu
#include<spu_intrinsics.h> avoidscalartypesuse:
d=spu_and(a,b);e=spu_madd(a,b,c); spugccpure_spe_prog.copure_spe_prog.elf
Branchelimination
avoidbranching(if/else)
c=spu_sel(a,b,spu_cmpgt(a,d));
AsampleSPEprogram
volatileunion{ vec_float4vec; floatpart[4]; }sum; floatdot_product(constfloat*xp,constfloat*yp,constintsize){ sum.vec=(vec_float4){0,0,0,0}; vec_float4*xvp=(vec_float4*)xp; vec_float4*yvp=(vec_float4*)yp; vec_float4*xvp_end=xvp+size/4; while(__builtin_expect(xvp<xvp_end,1)){ sum.vec=spu_madd(*xvp,*yvp,sum.vec); xvp++; yvp++; } returnsum.part[0]+sum.part[1]+sum.part[2]+sum.part[3]; }
DMAwiththeSPUs'MemoryFlow Controllers
Doublebufferingtheproblem
Doublebufferingthebigpicture
DoublebufferingwithMFC
Someresources
CellBEProgrammingTutorial(ibm.com190pages) IBMdeveloperworksshortprogrammingtutorials
BarcelonaSupercomputingCenter(software)
PS3programmingworkshops(videos)
#ps3devonfreenode
Thanks,credits,licensing
MostschemasfromexcellentGFDL'dtutorialby GeoffLevand(SonyCorp)
http://www.kernel.org/pub/linux/kernel/people/geoff/cell
7differences