Cell-sdk, optimizations and other stuff on the ps3.

If you are new to YDL and have some more or less basic questions.

Cell-sdk, optimizations and other stuff on the ps3.

Postby nevertell » 10 Jun 2009, 20:09

Lately, I've been thinking about how could anyone make an usual linux distro use all the spe's. Well, I came to a conclusion, that to take advantage of cell as an every day user, you'd have to compile everything from source with cell-sdk. So, I thought I'd give it a try and start doing that, but before I do that, I had to make sure I am not doing something, that has already been done. So, I've asked ubuntu, gentoo and fedora forums, the answer was no. You are the last ones to stop me from doing heck of a lot work the next 3 months. So, does YDL been compiled using the cell-sdk libraries or is it just a little optimized build of a ppc kernel? When I mean compiled with cell-sdk, I mean that everything that is compilable is compiled using it.
nevertell
ydl newbie
ydl newbie
 
Posts: 2
Joined: 10 Jun 2009, 20:00

Re: Cell-sdk, optimizations and other stuff on the ps3.

Postby ppietro » 11 Jun 2009, 00:44

nevertell wrote:Lately, I've been thinking about how could anyone make an usual linux distro use all the spe's. Well, I came to a conclusion, that to take advantage of cell as an every day user, you'd have to compile everything from source with cell-sdk. So, I thought I'd give it a try and start doing that, but before I do that, I had to make sure I am not doing something, that has already been done. So, I've asked ubuntu, gentoo and fedora forums, the answer was no. You are the last ones to stop me from doing heck of a lot work the next 3 months. So, does YDL been compiled using the cell-sdk libraries or is it just a little optimized build of a ppc kernel? When I mean compiled with cell-sdk, I mean that everything that is compilable is compiled using it.


Unfortunately, it's not that simple.

Here's the deal.

The Cell has one PPE core and 6 SPE cores. The PPE is a moderately fast, in-order execution, single core, dual threaded PowerPC processor. The SPEs are vector math processors, kind of like super-AltiVec numeric co-processors. PPE code does not run on an SPE or vice-versa.

In addition, the SPEs are not Turing compliant - they can't run code stand-alone. Only the PPE can do that. Instead, you generate little "programlets" to run on the SPEs under the control of the PPE. The PPE loads the SPEs with code, puts some variables in them, and unleashes them. Then, either the PPE reads the SPE results, or the SPEs dump the results directly in memory.

A program needs to invoke the SPEs directly - there is no such thing as simply throwing a compiler "SPE-flag". Nor would compiling using the Cell SDK invoke any kind of SPE. Again - they need to be specifically coded for - standard programs - even using a multi-thread model - won't invoke them. What the Cell SDK buys you is the ability to use a SPE, should you choose to program for it.

So - no - since PowerPC Linuxes like ps3ubuntu, ydl, etc. are based on x86 paradigms and threading models, they don't natively use the SPEs. YDL does have the Cell SDK open source libraries included - you can run Cell programs that invoke SPEs directly on YDL without adding extra libraries. But - to answer your question, neither YDL, nor any PowerPC Linux, is compiled with the Cell SDK specifically, since none of the Linux code is Cell specific and would need those libraries.

If you really wanted to do this, you would have to re-architect the Linux kernel and architecture to support the PPE/SPE "throw-catch" model. I would suggest using a different kernel than Linux - possibly the Carnegie-Mellon MACH kernel, which might be able to support mixed architectures like the Cell. You would then have to re-write GNU libraries to also support this model and compile with the MACH kernel.

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: Cell-sdk, optimizations and other stuff on the ps3.

Postby nevertell » 11 Jun 2009, 09:27

Now I see, thanks for the reply. This kind of sucks, to use all the power the ps3 has with linux, you have to practically rewrite everything from scratch.
nevertell
ydl newbie
ydl newbie
 
Posts: 2
Joined: 10 Jun 2009, 20:00

Re: Cell-sdk, optimizations and other stuff on the ps3.

Postby CronoCloud » 13 Jun 2009, 10:15

ppietro wrote:
Here's the deal.

The Cell has one PPE core and 6 SPE cores. The PPE is a moderately fast, in-order execution, single core, dual threaded PowerPC processor. The SPEs are vector math processors, kind of like super-AltiVec numeric co-processors.


Isn't each PPE thread Altivec enabled as well?

Ron Rogers Jr. (CronoCloud)
CECHE01 PS3 (MGS4 80GB Bundle) without OtherOS and with an upgraded 320GB HD
Running Fedora 23 on a Compaq Presario CQ5320F upgraded with a Phenom X4 and GT640
Vizio E221A1 22" 1080P TV with HDMI, using 1080P over HDMI
PSN ID: CronoCloudAuron
User avatar
CronoCloud
Moderator
Moderator
 
Posts: 523
Joined: 21 Oct 2006, 05:48
Location: Central Illinois, USA

Re: Cell-sdk, optimizations and other stuff on the ps3.

Postby ppietro » 14 Jun 2009, 00:43

CronoCloud wrote:
ppietro wrote:
Here's the deal.

The Cell has one PPE core and 6 SPE cores. The PPE is a moderately fast, in-order execution, single core, dual threaded PowerPC processor. The SPEs are vector math processors, kind of like super-AltiVec numeric co-processors.


Isn't each PPE thread Altivec enabled as well?

Ron Rogers Jr. (CronoCloud)


That's a good question. Let me check with a PowerPC programmer friend of mine. I know he's written some AltiVec code.

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: Cell-sdk, optimizations and other stuff on the ps3.

Postby ppietro » 08 Aug 2009, 03:22

ppietro wrote:
CronoCloud wrote:Isn't each PPE thread Altivec enabled as well?


That's a good question. Let me check with a PowerPC programmer friend of mine. I know he's written some AltiVec code.


Finally remembered to ask him. Here's his reply:
I believe there is one single altivec unit. The single core/dual thread architecture doesn't duplicate the processing units, it just aadds a clever scheduler which pipelines instructions from two threads simultaneously. Essentially all it's doing is increasing utilization of the existing processing units, rather than letting them stall when the current instruction isn't using them.


Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18


Return to Beginner

Who is online

Users browsing this forum: No registered users and 54 guests