Version française
Home     About     Download     Resources     Contact us    
Browse thread
More registers in modern day CPUs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gordon Henriksen <gordonhenriksen@m...>
Subject: Re: [Caml-list] OCalm on Sony PS3 (was Re: More registers in modern day CPUs)
On Dec 2, 2007, at 05:14, Xavier Leroy wrote:

>> I'd also be interested in any ideas for starting to explore whether/ 
>> how the Cell BE's power can be exploited using OCaml (hopefully  
>> simple ideas at the outset, I'm a newb on several fronts here).
>
> The SPU cores only have 256 Kb of local memory, so there is no hope  
> to run a Caml run-time system on them.  For some applications  
> (linear algebra, bignums), it might be possible to link with C  
> libraries that offload work to the SPU cores.
>
> A more general but extremely difficult approach is two-level  
> programming, where the Caml program, running on the PPC core,  
> generates programs in a simple data-parallel language which is then  
> compiled on the fly to SPU code.  Such an approach could also target  
> graphics coprocessors (the "GPGPU" approach).  But I have no idea  
> what such an intermediate language would look like.


Though difficult, this is probably a more practical approach.  
Statically extracting useful parallel programs is a very difficult  
task. (Witness the emergence of OpenMP.) It is probably easier for  
functional programs, but still.

In related news, Areospace legal recently cleared the CellSPU backend  
for upstream contribution to LLVM (http://llvm.org/) and its author is  
finally committing it today. As has been mentioned, it's possible to  
efficiently build LLVM IR in memory with Ocaml. Anyone interested in  
leveraging SPUs from Ocaml in this manner could spool up quickly with  
LLVM. Since LLVM has solid support for mainstream CPUs, so it would be  
quite possible to write programs which were also portable to standard  
SMP hardware.

— Gordon