Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 30-Nov-2005, 13:31   #1
Titanio
Regular
 
Join Date: Dec 2004
Posts: 5,670
Default An interview with Alex Chow on Cell Programming models (he mentions Cg..?)

http://www-128.ibm.com/developerwork...ry/pa-expert8/

It's dated 22 Nov, but I hadn't seen it discussed here - sorry if old!

Very interesting read. One bit that jumped out at me:

Quote:
dW: Do the programming models require some pre-knowledge by the compiler?

Chow: The currently released compiler and toolchain do not have pre-knowledge of any programming model. Some other compilers, for example, openMP and Cg, define their own programming model through their languages.
Cg...as in Nvidia Cg...?! That's the only Cg compiler I've heard of at least. The implications would be...

The rest is well worth reading aswell. Some other info there like the cost of a context switch on the SPU (20 microseconds) too.

Last edited by Titanio; 30-Nov-2005 at 14:26.
Titanio is offline   Reply With Quote
Old 30-Nov-2005, 13:34   #2
Carl B
Friends call me xbd
 
Join Date: Feb 2005
Posts: 6,293
Default

I think he's just offering openMP and Cg up as examples, not linking them to Cell. But going to read the interview now.
__________________
Somebody set up us the bomb.
Carl B is offline   Reply With Quote
Old 30-Nov-2005, 13:42   #3
Titanio
Regular
 
Join Date: Dec 2004
Posts: 5,670
Default

Quote:
Originally Posted by xbdestroya
I think he's just offering openMP and Cg up as examples, not linking them to Cell. But going to read the interview now.
There is an openMP compiler for Cell though..

I didn't think to question that he wasn't linking them to Cell, just whether there was some other kind of Cg compiler out there! It seemed very much like he was saying "well this doesn't but these do". Unless many other compilers don't have similar characteristics, it would seem rather coincidental that he'd choose to mention Cg also, given NVidia's involvement on the other side of the bus so to speak (especially given that his other example is on Cell too). It also happens to be the one other compiler amongst those mentioned that isn't explicitly IBM related - why would he know much about it..?

Last edited by Titanio; 30-Nov-2005 at 13:49.
Titanio is offline   Reply With Quote
Old 30-Nov-2005, 13:44   #4
Nite_Hawk
Senior Member
 
Join Date: Feb 2002
Location: Minneapolis, MN
Posts: 1,202
Send a message via ICQ to Nite_Hawk Send a message via AIM to Nite_Hawk Send a message via MSN to Nite_Hawk
Default

Quote:
Originally Posted by Titanio
There is an openMP compiler for Cell though..

I didn't think to question that he wasn't linking them to Cell, just whether there was some other kind of Cg compiler out there! It seemed very much like he was saying "well this doesn't but these do"...
I seem to remember there being some discussion about CG and cell a number of months back, but I really can't remember any of the details. It certainly would be nice.

Nite_Hawk
Nite_Hawk is offline   Reply With Quote
Old 30-Nov-2005, 13:48   #5
Carl B
Friends call me xbd
 
Join Date: Feb 2005
Posts: 6,293
Default

Well in any event just finished reading the interview: good interview! The first half is especially interesting I feel.

Quote:
...dW: The current way that the documentation seems to keep pointing to is that the SPE executable stuff is embedded within the ELF as a section. Is there any model development towards having the SPE executable as its own stand-alone file that can be read in by a framework application?

Chow: Yes, we do have that. We have a runtime environment that can take the SPU stand-alone executable as-is and run it on an SPU. We call such stand-alone SPU executable, SPUlet.

dW: Is that built on top of, like, the SPUFS model (See Resources) that was developed in Boeblingen?

Chow: SPUFS is a resource representation model that the kernel uses to manage SPU-related resources. Though the representation provides a clean boundary between what user-level applications can do and what kernel does, it is not convenient for an application programmer to use directly. Our additional runtime environment provides two different models for the Cell programmer. One is the SPUlet model. A programmer simply creates an SPU executable, and our runtime environment can load it to an SPU and start its execution. In this case, the SPU executable is a stand-alone file. It does not need to be included in a CESOF file. Another model is called SPE-thread model. It is also built on top of the SPUFS representation. A programmer using the whole Cell resource usually programs to this SPE-thread model that allows the programmer to manage more than one SPE program or thread. We use CESOF to piece together these different SPE programs and PPE programs into a single executable image.

dW: And another term that I noticed you used in your paper was "double-buffering." I'm aware of the use of the term "double-buffering" in video composition, but it is also the correct term in this application?

Chow: It is a term and technique frequently used by PS2 game programmers. Of course, there is a similar concept in video composition. Because the DMA engine and the CPU can operate independently, we start the data transfer of a new piece of data while we are processing the old piece of data. In the video composition term, we are drawing the next frame while we are showing the previous frame. A similar technique used by the MPI programming is called "prefetching."

dW: I see a lot of "mailboxes," references to input and output "mailboxes." Is that basically a DMA address?

Chow: No. The mailbox is a special set of registers of SPE and PPE. Each SPE can communicate with the PPE through these registers. A PU program can simply send or receive 32-bits data to and from SPU . It can be used as a very simple synchronization mechanism between PPU and SPU programs.

dW: Is it polled or interrupt-driven?

Chow: Both -- the architecture can support both...
__________________
Somebody set up us the bomb.

Last edited by Carl B; 30-Nov-2005 at 13:52.
Carl B is offline   Reply With Quote
Old 30-Nov-2005, 13:50   #6
nAo
Nutella Nutellae
 
Join Date: Feb 2002
Location: San Francisco
Posts: 4,297
Default

Quote:
Originally Posted by Titanio
Cg...as in Nvidia Cg...?! That's the only Cg compiler I've heard of at least. The implications would be...
That you could compile a vertex shader to run on a SPE, nothing ground breaking here.
__________________
[twitter]
More samples, we need more samples! [Dean Calver]
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way
nAo is offline   Reply With Quote
Old 30-Nov-2005, 13:52   #7
Titanio
Regular
 
Join Date: Dec 2004
Posts: 5,670
Default

Quote:
Originally Posted by nAo
That you could compile a vertex shader to run on a SPE, nothing ground breaking here.
I wasn't thinking so much technical issues, but more that to me it would suggest tighter collaboration between NVidia and Sony than I might have expected. A clearer manifestation of all that CPU<->GPU talk too. But it does also raises other technical issues, who's answers could or would be interesting (like balancing between SPUs and vertex shaders - manual or automatic? etc.)

And confirmation that we could compile a Cg vertex shader to Cell would be new

Last edited by Titanio; 30-Nov-2005 at 14:08.
Titanio is offline   Reply With Quote
Old 30-Nov-2005, 17:54   #8
Farid
Artist formely known as Vysez
 
Join Date: Mar 2004
Location: Paris, France
Posts: 3,899
OpenGL

Quote:
Originally Posted by Titanio
And confirmation that we could compile a Cg vertex shader to Cell would be new
Wasn't that already hinted as possible a "long time" ago?
__________________
- Power corrupts and absolute power is kinda neat.
- If at first you don't succeed, put it out for beta test.
--Internets
Farid is offline   Reply With Quote
Old 30-Nov-2005, 18:01   #9
Bobbler
Shazbot!
 
Join Date: May 2005
Location: Minneapolis, MN
Posts: 1,827
Send a message via ICQ to Bobbler Send a message via AIM to Bobbler Send a message via MSN to Bobbler
Default

Quote:
Originally Posted by Vysez
Wasn't that already hinted as possible a "long time" ago?
I think the only hint came out of speculation about how it would be kind of cool to be able to use Cg on an SPE -- I don't remember any rumor from any sort of official source (like a leak from IBM or Nvidia). Not sure there was any solid evidence to come to any conclusion -- it seems it is definately a possibility now though!

Although, I'm not really sure what you'd really want to use it all for in a vast majority of the cases, but more choices is nice, I suppose.
Bobbler is offline   Reply With Quote
Old 30-Nov-2005, 18:08   #10
Titanio
Regular
 
Join Date: Dec 2004
Posts: 5,670
Default

Quote:
Originally Posted by Vysez
Wasn't that already hinted as possible a "long time" ago?
IIRC, there was a semi-ambiguous comment from Mark Deloura from SCEA a while back. But it was mostly speculation.

Maybe we should listen to zdnet.com more often:

http://news.zdnet.com/2100-1040_22-5606515.html

Quote:
Cell will also use Cg, a language developed by graphics chip leader Nvidia for creating high-level graphics effects.
Titanio is offline   Reply With Quote
Old 30-Nov-2005, 20:18   #11
Shifty Geezer
Grumpy Mod
 
Join Date: Dec 2004
Location: In a pretty pink padded cell
Posts: 25,988
Default

I too vaguely remember hearing something about running Cg on Cell, but I don't know where.
__________________
Shifty Geezer
...

Tolerance for internet moronism is exhausted. Anyone talking about people's attitudes in the Console fora, rather than games and technology, will feel my wrath. Read the FAQ to remind yourself how to behave and avoid unsightly incidents.
Shifty Geezer is offline   Reply With Quote
Old 30-Nov-2005, 22:02   #12
mckmas8808
Senior Member
 
Join Date: Mar 2005
Posts: 6,744
Icon Question Need Help

Now exactly how would using Cg on Cell to do vertex shaders help a PS3 game?
mckmas8808 is offline   Reply With Quote
Old 30-Nov-2005, 22:08   #13
wireframe
Senior Member
 
Join Date: Jul 2004
Posts: 1,347
Default

Quote:
Originally Posted by Titanio
The implications would be...
Like has already been stated, he is using Cg as an example. One obvious reason for this may be that the Cg compiler has to made to work with Cell as Cg is part of the Playstation 3 development platform.
wireframe is offline   Reply With Quote
Old 30-Nov-2005, 22:10   #14
wireframe
Senior Member
 
Join Date: Jul 2004
Posts: 1,347
Default

Quote:
Originally Posted by mckmas8808
Now exactly how would using Cg on Cell to do vertex shaders help a PS3 game?
Cg will be used to code, notably shaders, for the RSX. It would make sense to have Playstation 3 compatible Cg (hence Cell compatible and exploiting) to prevent having to cross-compile from another platform. Cg on a Cell workstation keeps it all under one roof, so to speak.
wireframe is offline   Reply With Quote
Old 30-Nov-2005, 22:18   #15
Titanio
Regular
 
Join Date: Dec 2004
Posts: 5,670
Default

Quote:
Originally Posted by wireframe
Like has already been stated, he is using Cg as an example. One obvious reason for this may be that the Cg compiler has to made to work with Cell as Cg is part of the Playstation 3 development platform.
It'd be the odd one out then..

Does Nvidia provide for Cg running on PC CPUs (as a backup, emulation etc.)? This wouldn't be a million miles from that anyhow..
Titanio is offline   Reply With Quote
Old 30-Nov-2005, 22:44   #16
DeanoC
Senior Member
 
Join Date: Feb 2003
Location: Sheppey, UK
Posts: 1,439
Default

Quote:
Originally Posted by Titanio
I wasn't thinking so much technical issues, but more that to me it would suggest tighter collaboration between NVidia and Sony than I might have expected.
Why would it suggest a closer collaboration? Cg is an open standard, non nvidia people could and have written there own parser... if you had to choose a vector C like language, Cg would be a reasonable one to start with and it would have nothing to do with NVIDIA.
__________________
Riding the stormy ship called indie game development
DeanoC is offline   Reply With Quote
Old 30-Nov-2005, 22:44   #17
wireframe
Senior Member
 
Join Date: Jul 2004
Posts: 1,347
Default

Quote:
Originally Posted by Titanio
It'd be the odd one out then..

Does Nvidia provide for Cg running on PC CPUs (as a backup, emulation etc.)? This wouldn't be a million miles from that anyhow..
I don't really understand what you are saying or asking. Cg is ultimately a compiler that takes something like C syntax (hence "C for graphics" = Cg) to generate GPU code. It is Nvidia's "equivalent" to Microsoft's HLSL. So, if you are saying "Cg running on PC," I take it you mean the Cg Toolkit, which currently exists for Windows, Linux, and MacOS X. (Main page/introduction and Cg toolkit)

What I am saying is that it will (does) also exist for the Playstation 3 development platform as this technology is part of that platform, along with OpenGL ES and what-have-you.
wireframe is offline   Reply With Quote
Old 30-Nov-2005, 22:48   #18
mckmas8808
Senior Member
 
Join Date: Mar 2005
Posts: 6,744
Default

Quote:
Originally Posted by DeanoC
Why would it suggest a closer collaboration? Cg is an open standard, non nvidia people could and have written there own parser... if you had to choose a vector C like language, Cg would be a reasonable one to start with and it would have nothing to do with NVIDIA.
Are you guys using Cg on the Cell?
mckmas8808 is offline   Reply With Quote
Old 30-Nov-2005, 22:51   #19
Titanio
Regular
 
Join Date: Dec 2004
Posts: 5,670
Default

Quote:
Originally Posted by wireframe
I don't really understand what you are saying or asking. Cg is ultimately a compiler that takes something like C syntax (hence "C for graphics" = Cg) to generate GPU code. It is Nvidia's "equivalent" to Microsoft's HLSL. So, if you are saying "Cg running on PC," I take it you mean the Cg Toolkit, which currently exists for Windows, Linux, and MacOS X. (Main page/introduction and Cg toolkit)
I'm wondering if this can compile to PC CPUs? My guess is no, but..

Quote:
Originally Posted by DeanoC
Why would it suggest a closer collaboration? Cg is an open standard, non nvidia people could and have written there own parser...
I wasn't aware of this
Titanio is offline   Reply With Quote
Old 30-Nov-2005, 22:58   #20
Jawed
Regular
 
Join Date: Oct 2004
Location: London
Posts: 9,863
Send a message via Skype™ to Jawed
Default

Quote:
Originally Posted by mckmas8808
Are you guys using Cg on the Cell?
DeanoC's implication appears to be that Cg makes for a very good Vector C programming language.

Since Cell's design is so strongly focussed on vector processing, Cg seems to make a good match. Regardless of whether the code is for graphics or physics etc.

Jawed
Jawed is offline   Reply With Quote
Old 30-Nov-2005, 22:59   #21
mckmas8808
Senior Member
 
Join Date: Mar 2005
Posts: 6,744
Default

Quote:
Originally Posted by Jawed
DeanoC's implication appears to be that Cg makes for a very good Vector C programming language.

Since Cell's design is so strongly focussed on vector processing, Cg seems to make a good match. Regardless of whether the code is for graphics or physics etc.

Jawed
Oh okay, so more than likely they are using it then.

Cool.
mckmas8808 is offline   Reply With Quote
Old 30-Nov-2005, 23:11   #22
Shifty Geezer
Grumpy Mod
 
Join Date: Dec 2004
Location: In a pretty pink padded cell
Posts: 25,988
Default

Does it matter though? Whether they're writing in C, C++, Cg, Fortran, PASCAL, hex-code or the Aztec language N'ahuatl, who cares as long as it's a good game?
__________________
Shifty Geezer
...

Tolerance for internet moronism is exhausted. Anyone talking about people's attitudes in the Console fora, rather than games and technology, will feel my wrath. Read the FAQ to remind yourself how to behave and avoid unsightly incidents.
Shifty Geezer is offline   Reply With Quote
Old 30-Nov-2005, 23:15   #23
!eVo!-X Ant UK
Naughty Boy!
 
Join Date: Jul 2005
Posts: 568
Default

Just a Few simple questions if i may??

1. Does it mean that Cell is not as difficult to program because its using this Cg thing???

2. What does it mean to the GAMES???
!eVo!-X Ant UK is offline   Reply With Quote
Old 30-Nov-2005, 23:17   #24
Jawed
Regular
 
Join Date: Oct 2004
Location: London
Posts: 9,863
Send a message via Skype™ to Jawed
Default

Quote:
Originally Posted by Jawed
DeanoC's implication appears to be that Cg makes for a very good Vector C programming language.

Since Cell's design is so strongly focussed on vector processing, Cg seems to make a good match. Regardless of whether the code is for graphics or physics etc.

Jawed
On the other hand, does Cg support objects?

Jawed
Jawed is offline   Reply With Quote
Old 30-Nov-2005, 23:19   #25
wireframe
Senior Member
 
Join Date: Jul 2004
Posts: 1,347
Default

Quote:
Originally Posted by Shifty Geezer
Does it matter though? Whether they're writing in C, C++, Cg, Fortran, PASCAL, hex-code or the Aztec language N'ahuatl, who cares as long as it's a good game?
I thought it was fairly obvious that the Cell BE will be programmed using C/C++ with some inline assembly and that RSX will have shader code generated by Cg. That is, until I read this thread.

I'm completely lost as to what is being discussed. Are people thinking that Cg will be used to program Cell? If so, why? Why not use GCC?

EDIT: I am really hoping this is all just confusion as to what Cg is/does. Think Microsoft HLSL, or even GLSL if you must. Think Visual Studio (to some extent).
wireframe is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:16.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.