Tamas Papp | 29 Sep 15:54 2011
Picon

GPU/CUDA & common lisp

Hi everyone,

I am about to buy a new server for number crunching, and I would like to 
keep my options open about GPU/CUDA based computations.  The most 
intensively parallelizable thing that I am doing is particle filtering, 
and currently that works fine (and is really fast) in a multi-core CPU 
with SBCL, but I keep hearing wonderful things about GPUs from people, 
and I was wondering if I could make use of them but still program in CL.

I basically have two questions:

- What is the current status of using CPUs for computation in CL (in 
particular SBCL)?  All I found was CL-GPU but I haven't tried it yet (my 
current server does not have a GPU).

- What hardware is supported (if I want to use CL)?  Can I use something 
like Nvidia's TESCLA C line?

Any help/pointers/accounts would be appreciated, I am just exploring this 
so I don't know much about it yet, apologies if I am not asking the right 
questions.

Best,

Tamas

Alexander Repenning | 29 Sep 20:16 2011
Picon

Re: GPU/CUDA & common lisp


On Sep 29, 2011, at 7:54 AM, Tamas Papp wrote:

Hi everyone,

I am about to buy a new server for number crunching, and I would like to
keep my options open about GPU/CUDA based computations.  The most
intensively parallelizable thing that I am doing is particle filtering,
and currently that works fine (and is really fast) in a multi-core CPU
with SBCL, but I keep hearing wonderful things about GPUs from people,
and I was wondering if I could make use of them but still program in CL.

I basically have two questions:

- What is the current status of using CPUs for computation in CL (in
particular SBCL)?  All I found was CL-GPU but I haven't tried it yet (my
current server does not have a GPU).


I assume you mean GPUs...

This is an XMLisp example using GLSL for image processing (blur and color saturation) via a shader getting about 100 GFlops (that is a lot):


The integration with Common Lisp is: CLs load and compiles the shader (via GLSL functions) and communicates via glUniform functions in real time. Some of the image processing happens in CL via GL functions running on the CPU but the main part is the shader processing pixels/texels on the GPU.



- What hardware is supported (if I want to use CL)?  Can I use something
like Nvidia's TESCLA C line?

CUDA has its own set of requirements but GLSL runs on most video cards unless they are super old. E.g., on Mac hardware:



not sure this is useful,  Alex



Any help/pointers/accounts would be appreciated, I am just exploring this
so I don't know much about it yet, apologies if I am not asking the right
questions.

Best,

Tamas


_______________________________________________
pro mailing list
pro-F1HGIaG5STRyXAeb93iumQ@public.gmane.org
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro

Prof. Alexander Repenning


University of Colorado

Computer Science Department

Boulder, CO 80309-430


vCard: http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf



<div>
<br><div>
<div>On Sep 29, 2011, at 7:54 AM, Tamas Papp wrote:</div>
<br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi everyone,<br><br>I am about to buy a new server for number crunching, and I would like to <br>keep my options open about GPU/CUDA based computations. &nbsp;The most <br>intensively parallelizable thing that I am doing is particle filtering, <br>and currently that works fine (and is really fast) in a multi-core CPU <br>with SBCL, but I keep hearing wonderful things about GPUs from people, <br>and I was wondering if I could make use of them but still program in CL.<br><br>I basically have two questions:<br><br>- What is the current status of using CPUs for computation in CL (in <br>particular SBCL)? &nbsp;All I found was CL-GPU but I haven't tried it yet (my <br>current server does not have a GPU).<br><br>
</div></blockquote>
<div><br></div>
<div>I assume you mean GPUs...</div>
<div><br></div>
<div>This is an XMLisp example using GLSL for image processing (blur and color saturation) via a shader getting about 100 GFlops (that is a lot):</div>
<div><br></div>
<div><a href="http://www.google.com/codesearch#wtZMaMetHdI/trunk/XMLisp/sources/XLUI/examples/3D/GLSL%20OpenGL%20Blur%20shader.lisp&amp;q=shader%20package:http://xmlisp%5C.googlecode%5C.com&amp;ct=rc&amp;cd=1&amp;sq=">http://www.google.com/codesearch#wtZMaMetHdI/trunk/XMLisp/sources/XLUI/examples/3D/GLSL%20OpenGL%20Blur%20shader.lisp&amp;q=shader%20package:http://xmlisp%5C.googlecode%5C.com&amp;ct=rc&amp;cd=1&amp;sq=</a></div>
<div><br></div>
<div>The integration with Common Lisp is: CLs load and compiles the shader (via GLSL functions) and communicates via glUniform functions in real time. Some of the image processing happens in CL via GL functions running on the CPU but the main part is the shader processing pixels/texels on the GPU.</div>
<div><br></div>
<div><br></div>
<br><blockquote type="cite"><div>- What hardware is supported (if I want to use CL)? &nbsp;Can I use something <br>like Nvidia's TESCLA C line?<br>
</div></blockquote>
<div><br></div>
<div>CUDA has its own set of requirements but GLSL runs on most video cards unless they are super old. E.g., on Mac hardware:</div>
<div><br></div>
<div><a href="http://developer.apple.com/graphicsimaging/opengl/capabilities/">http://developer.apple.com/graphicsimaging/opengl/capabilities/</a></div>
<div><br></div>
<div><br></div>
<div>not sure this is useful, &nbsp;Alex</div>
<div><br></div>
<br><blockquote type="cite"><div>
<br>Any help/pointers/accounts would be appreciated, I am just exploring this <br>so I don't know much about it yet, apologies if I am not asking the right <br>questions.<br><br>Best,<br><br>Tamas<br><br><br>_______________________________________________<br>pro mailing list<br><a href="mailto:pro@...">pro@...</a><br>http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro<br>
</div></blockquote>
</div>
<br><div>
<span class="Apple-style-span"><span class="Apple-style-span"><p>Prof. Alexander Repenning</p>
<p><br class="khtml-block-placeholder"></p>
<p>University of Colorado</p>
<p>Computer Science Department</p>
<p>Boulder, CO 80309-430</p>
<p><br class="khtml-block-placeholder"></p>
<p>vCard: <a href="http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf">http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf</a></p>
<br class="Apple-interchange-newline"></span></span>
</div>
<br>
</div>
Mirko Vukovic | 4 Apr 15:58 2012
Picon

Re: GPU/CUDA & common lisp

Tamas Papp <tkpapp <at> ...> writes:

> 
> Hi everyone,
> 
> I am about to buy a new server for number crunching, and I would like to 
> keep my options open about GPU/CUDA based computations.  The most 
> intensively parallelizable thing that I am doing is particle filtering, 
> and currently that works fine (and is really fast) in a multi-core CPU 
> with SBCL, but I keep hearing wonderful things about GPUs from people, 
> and I was wondering if I could make use of them but still program in CL.
>
> ... stuff deleted
> 
> Best,
> 
> Tamas
> 
> 

Hi Tamas,

Did you make any progress in your GPU adventures?  I just got a machine with a
tesla GPU.  I'd like to run some Monte Carlo simulations on it.

Mirko

Alexander Repenning | 4 Apr 18:09 2012
Picon

Re: GPU/CUDA & common lisp

Not CUDA, but GLSL, running a 4 million cell game of life at > 60 FPS in XMLisp on a Mac:



This is of course a mix of Lisp and shader code. It would be possible to create a Lisp to GLSL shader compiler and then have the GLSL compiler do the rest. I don't think this would be a great idea, however. Somewhat lengthy explanation required but left off...

Alex



On Apr 4, 2012, at 7:58 AM, Mirko Vukovic wrote:

Tamas Papp <tkpapp <at> ...> writes:


Hi everyone,

I am about to buy a new server for number crunching, and I would like to
keep my options open about GPU/CUDA based computations.  The most
intensively parallelizable thing that I am doing is particle filtering,
and currently that works fine (and is really fast) in a multi-core CPU
with SBCL, but I keep hearing wonderful things about GPUs from people,
and I was wondering if I could make use of them but still program in CL.

... stuff deleted

Best,

Tamas



Hi Tamas,

Did you make any progress in your GPU adventures?  I just got a machine with a
tesla GPU.  I'd like to run some Monte Carlo simulations on it.

Mirko



_______________________________________________
pro mailing list
pro-F1HGIaG5STRyXAeb93iumQ@public.gmane.org
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro

Prof. Alexander Repenning


University of Colorado

Computer Science Department

Boulder, CO 80309-430


vCard: http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf



<div>
<div>Not CUDA, but GLSL, running a 4 million cell game of life at &gt; 60 FPS in XMLisp on a Mac:</div>
<div><br></div>
<div><br></div>
<div><a href="http://code.google.com/p/xmlisp/source/browse/trunk/XMLisp/sources/XLUI/examples/3D/GLSL-Conway.lisp">http://code.google.com/p/xmlisp/source/browse/trunk/XMLisp/sources/XLUI/examples/3D/GLSL-Conway.lisp</a></div>
<div><br></div>
<div>This is of course a mix of Lisp and shader code. It would be possible to create a Lisp to GLSL shader compiler and then have the GLSL compiler do the rest. I don't think this would be a great idea, however. Somewhat lengthy explanation required but left off...</div>
<div><br></div>
<div>Alex</div>
<div><br></div>
<div><br></div>
<br><div>
<div>On Apr 4, 2012, at 7:58 AM, Mirko Vukovic wrote:</div>
<br class="Apple-interchange-newline"><blockquote type="cite"><div>Tamas Papp &lt;tkpapp <at> ...&gt; writes:<br><br><blockquote type="cite"><br></blockquote>
<blockquote type="cite">Hi everyone,<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">I am about to buy a new server for number crunching, and I would like to <br>
</blockquote>
<blockquote type="cite">keep my options open about GPU/CUDA based computations. &nbsp;The most <br>
</blockquote>
<blockquote type="cite">intensively parallelizable thing that I am doing is particle filtering, <br>
</blockquote>
<blockquote type="cite">and currently that works fine (and is really fast) in a multi-core CPU <br>
</blockquote>
<blockquote type="cite">with SBCL, but I keep hearing wonderful things about GPUs from people, <br>
</blockquote>
<blockquote type="cite">and I was wondering if I could make use of them but still program in CL.<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">... stuff deleted<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">Best,<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">Tamas<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite"><br></blockquote>
<br>Hi Tamas,<br><br>Did you make any progress in your GPU adventures? &nbsp;I just got a machine with a<br>tesla GPU. &nbsp;I'd like to run some Monte Carlo simulations on it.<br><br>Mirko<br><br><br><br>_______________________________________________<br>pro mailing list<br><a href="mailto:pro@...">pro@...</a><br>http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro<br>
</div></blockquote>
</div>
<br><div>
<span class="Apple-style-span"><span class="Apple-style-span"><span class="Apple-style-span"><p>Prof. Alexander Repenning</p>
<p><br class="khtml-block-placeholder"></p>
<p>University of Colorado</p>
<p>Computer Science Department</p>
<p>Boulder, CO 80309-430</p>
<p><br class="khtml-block-placeholder"></p>
<p>vCard: <a href="http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf">http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf</a></p>
<br class="Apple-interchange-newline"></span></span></span>
</div>
<br>
</div>
Mirko Vukovic | 5 Apr 14:47 2012
Picon

Re: GPU/CUDA & common lisp

Thank you both Alexander, Nikodemus,

In my excitement, I may have jumped the gun :-)

Let me first write & verify the code, then worry about porting to GPU.

Mirko

On Wed, Apr 4, 2012 at 12:09 PM, Alexander Repenning <ralex-8MTm7EM7wxev0IrbefU98A@public.gmane.org> wrote:
Not CUDA, but GLSL, running a 4 million cell game of life at > 60 FPS in XMLisp on a Mac:



This is of course a mix of Lisp and shader code. It would be possible to create a Lisp to GLSL shader compiler and then have the GLSL compiler do the rest. I don't think this would be a great idea, however. Somewhat lengthy explanation required but left off...

Alex



On Apr 4, 2012, at 7:58 AM, Mirko Vukovic wrote:

Tamas Papp <tkpapp <at> ...> writes:


Hi everyone,

I am about to buy a new server for number crunching, and I would like to
keep my options open about GPU/CUDA based computations.  The most
intensively parallelizable thing that I am doing is particle filtering,
and currently that works fine (and is really fast) in a multi-core CPU
with SBCL, but I keep hearing wonderful things about GPUs from people,
and I was wondering if I could make use of them but still program in CL.

... stuff deleted

Best,

Tamas



Hi Tamas,

Did you make any progress in your GPU adventures?  I just got a machine with a
tesla GPU.  I'd like to run some Monte Carlo simulations on it.

Mirko



_______________________________________________
pro mailing list
pro-F1HGIaG5STRyXAeb93iumQ@public.gmane.org
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro

Prof. Alexander Repenning


University of Colorado

Computer Science Department

Boulder, CO 80309-430


vCard: http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf




<div>
<p>Thank you both Alexander, Nikodemus,<br><br>In my excitement, I may have jumped the gun :-)<br><br>Let me first write &amp; verify the code, then worry about porting to GPU.<br><br>Mirko<br><br></p>
<div class="gmail_quote">On Wed, Apr 4, 2012 at 12:09 PM, Alexander Repenning <span dir="ltr">&lt;<a href="mailto:ralex@...">ralex@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote"><div>
<div>Not CUDA, but GLSL, running a 4 million cell game of life at &gt; 60 FPS in XMLisp on a Mac:</div>
<div><br></div>
<div><br></div>
<div><a href="http://code.google.com/p/xmlisp/source/browse/trunk/XMLisp/sources/XLUI/examples/3D/GLSL-Conway.lisp" target="_blank">http://code.google.com/p/xmlisp/source/browse/trunk/XMLisp/sources/XLUI/examples/3D/GLSL-Conway.lisp</a></div>
<div><br></div>
<div>This is of course a mix of Lisp and shader code. It would be possible to create a Lisp to GLSL shader compiler and then have the GLSL compiler do the rest. I don't think this would be a great idea, however. Somewhat lengthy explanation required but left off...</div>
<div><br></div>
<div>Alex</div>
<div><br></div>
<div><br></div>
<br><div>
<div>On Apr 4, 2012, at 7:58 AM, Mirko Vukovic wrote:</div>
<br><blockquote type="cite"><div>Tamas Papp &lt;tkpapp <at> ...&gt; writes:<br><br><blockquote type="cite">
<br>
</blockquote>
<blockquote type="cite">Hi everyone,<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">I am about to buy a new server for number crunching, and I would like to <br>
</blockquote>
<blockquote type="cite">keep my options open about GPU/CUDA based computations. &nbsp;The most <br>
</blockquote>
<blockquote type="cite">intensively parallelizable thing that I am doing is particle filtering, <br>
</blockquote>
<blockquote type="cite">
and currently that works fine (and is really fast) in a multi-core CPU <br>
</blockquote>
<blockquote type="cite">with SBCL, but I keep hearing wonderful things about GPUs from people, <br>
</blockquote>
<blockquote type="cite">
and I was wondering if I could make use of them but still program in CL.<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">... stuff deleted<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">Best,<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite">Tamas<br>
</blockquote>
<blockquote type="cite"><br></blockquote>
<blockquote type="cite"><br></blockquote>
<br>Hi Tamas,<br><br>Did you make any progress in your GPU adventures? &nbsp;I just got a machine with a<br>tesla GPU. &nbsp;I'd like to run some Monte Carlo simulations on it.<br><br>Mirko<br><br><br><br>_______________________________________________<br>
pro mailing list<br><a href="mailto:pro@..." target="_blank">pro@...</a><br><a href="http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro" target="_blank">http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro</a><br>
</div></blockquote>
</div>
<br><div>
<span><span><span><p>
Prof. Alexander Repenning</p>
<p><br></p>
<p>University of Colorado</p>
<p>
Computer Science Department</p>
<p>Boulder, CO 80309-430</p>
<p><br></p>
<p>vCard: <a href="http://www.cs.colorado.edu/%7Eralex/AlexanderRepenning.vcf" target="_blank">http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf</a></p>
<br></span></span></span>
</div>
<br>
</div></blockquote>
</div>
<br>
</div>
Nikodemus Siivola | 4 Apr 19:23 2012
Picon

Re: GPU/CUDA & common lisp

On 4 April 2012 16:58, Mirko Vukovic <mirko.vukovic <at> gmail.com> wrote:

> Did you make any progress in your GPU adventures?  I just got a machine with a
> tesla GPU.  I'd like to run some Monte Carlo simulations on it.

The CL-GPU Tamas mentioned is here:

  https://github.com/angavrilov/cl-gpu

Cheers,

 -- Nikodemus

_______________________________________________
pro mailing list
pro <at> common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro

Gmane