
CUDA 10 in Clojure - dragandj
https://dragan.rocks/articles/18/CUDA-10-in-Clojure
======
thom
Reminder that you can support Dragan's work on Patreon, if it's acceptable to
post here:

[https://www.patreon.com/draganrocks](https://www.patreon.com/draganrocks)

------
adrianm
The experimental CUDA bindings for LWJGL3 might also be an interesting target
for Clojure interop:
[https://github.com/LWJGL/lwjgl3/blob/master/modules/samples/...](https://github.com/LWJGL/lwjgl3/blob/master/modules/samples/src/test/java/org/lwjgl/demo/cuda/HelloCUDA.java)

LWJGL3 is full of hidden treasures.

------
gleenn
Neanderthal and ClojureCUDA seem like such awesome projects, makes me wish I
had more time to get into linear algebra. Is anyone doing anything fun with it
they could share?

~~~
cat199
non-ANN ML is essentially a subset of linear algebra applied to statistics.

also, if you do anything involving physics simulations, (actual physics,
mechanical engineering, other engineering, etc) you will likely use it.

also finance. also also also.

------
thetricia
Wonder if there'd be any lisp or clojure dsl that compiles down to fairly
minimal c/cpp, so that you wouldn't have to have the cuda program be a string

~~~
dragandj
Cuda program doesn't have to be a string. I keep them in regular .cu files,
and just load them with slurp into clojure repl.

~~~
vbuwivbiu
yes but wouldn't it be nice to be able to emit CUDA/OpenCL code from an AST so
that you could use your Clojure functions on the GPU without duplication ?

~~~
dragandj
It wouldn't since most of Clojure functions would be poor match for the GPU
hardware.

------
Hupriene
I really wish clojure would adopt a heredoc syntax to make embed language
snippets and docstrings nicer.

~~~
OliverM
Some codebases have adopted markdown for their docstrings, and other nice
formats are only a macro away.

~~~
Hupriene
Using markdown doesn't fix the problem of having to escape double quotes,
unless you are using a literate programming technique where the clojure code
is quoted inside of the markdown instead of vice versa. Using macros only
works if the formats consist entirely of balanced s-expressions.

------
Zekio
Been searching for a while trying to see if there are only CUDA libraries for
Clojure and as far I can tell that is sadly the truth, no signs of any ROCm
libraries available [https://rocm.github.io/](https://rocm.github.io/)

~~~
dragandj
Neanderthal has an OpenCL backend, and ClojureCL can be used for programming
your own stuff, and they both work fine with ROCm's OpenCL support.

------
dr_teh
Dragan does it again

~~~
squaredpants
He does rock!

