Any Lisp extensions for CUDA?
Asked Answered
S

4

17

I just noted that one of the first languages for the Connection-Machine of W.D. Hillis was *Lisp, an extension of Common Lisp with parallel constructs. The Connection-Machine was a massively parallel computer with SIMD architecture, much the same as modern GPU cards.

So, I would expect that an adaptation of *Lisp to GPGPU - maybe to nVidia CUDA, as it is the most advanced de facto standard - would be quite natural.

So far, besides the nVidia SDK for C/C++, I only found PyCUDA, a Python environment. Has anybody heard anything about Lisp?

Sempach answered 18/5, 2011 at 15:18 Comment(0)
S
22

Penumbra is an idiomatic wrapper for OpenGL in Clojure. Calx is an idiomatic wrapper for OpenCL to target CPUs, GPUs, and more exotic hardware. See also calling CUDA from Clojure.

CL-OPENGL is a set of Common Lisp bindings to the OpenGL, GLU and GLUT APIs. CL-GPU is a translator from a subset of Common Lisp to CUDA for writing GPU kernels. ECL-COMPUTE is a DSL for SSE/CUDA computation in Embeddable Common Lisp.

Salpiglossis answered 18/5, 2011 at 15:59 Comment(0)
D
11

I recently start developing cl-cuda which is a library to use NVIDIA CUDA in Common Lisp programs. Although it has just been started and in the very early stage of development, you can try some simple sample codes like large vector addition.

Please see, https://github.com/takagi/cl-cuda

If you are interested in this project, any feedbacks are welcome.

Damages answered 2/6, 2012 at 19:12 Comment(0)
W
3

A while ago I made a library to call CUDA-functions/libraries from common lisp. Its purpose was to do things like

(let ((myarray (make-array ...))
      (another-array (make-array ...)))
  ;fill myarray
  (cublas-saxpy n -1.0 another-array 1 myarray 1)
  (cufft-nocopy myarray n :forward t :normalize nil)
  ;use results
  )

Check it out at https://github.com/knutgj/cl-cudalib

The specific functions are currently limited to what I have had use for, but it is trivial to extend to complete cuBLAS and cuFFT as well as roll your own CUDA libraries. Currently only SBCL is supported, but this should also be easy to extend.

I am considering to make a similar package for openCL and the AMD APPML.

Welborn answered 25/10, 2013 at 9:55 Comment(0)
O
0

For Clojure, fast matrix calculations using gpu, neanderthal and clojureCUDA by Dragan Djuric will bring it. From the same author, clojurecl is for OpenGL. For Tensors and Neural Networks deep-diamond.

Organometallic answered 3/6, 2020 at 18:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.