Re:An Introduction to GPU Programming in Julia
by KenoFischer on Thursday October 18, 2018 @05:03PM
(#18252098)
Am I missing something? I was excited about other languages doing the same as Julia, but the first example for ClojureCUDA has
Is there an example where the kernel is written in Clojure?
[ Parent
| on HN ]
Re:An Introduction to GPU Programming in Julia
by dragandj on Thursday October 18, 2018 @06:16PM
(#18252640)
You can of course create Clojure/lisp code that would generate kernel code, but I am strongly against it as the default option, since I find plain C much better suited to small kernels close to hardware (which are only a small proportion of the overall code) than either lisp or Julia.
Please note that there is no need for out-of process compilation step. You compile this by calling a Clojure function, interactively from the REPL.
Re:An Introduction to GPU Programming in Julia
by KenoFischer on Thursday October 18, 2018 @06:30PM
(#18252763)
Sure, but that's a completely separate thing from what Julia is doing here. The whole point of the GPU backend is that you get almost the full flexibility of the Julia language at your disposal, without having to fall back to C code. As a result, not only is your code more familiar to Julia programmers, but you also get to share large amounts of code between CPU/GPU/TPU. If all you're doing is super small kernels that may not matter much, but GPUs are so powerful these days that it's perfectly sensible to offload rather large programs that you may not want to write in C anymore.
Re:An Introduction to GPU Programming in Julia
by 3rdAccount on Thursday October 18, 2018 @07:56PM
(#18253352)
It's not just easier to read for Julia programmers. Any pythonista can mostly read Julia without significant issue. They're both high level and syntactically similar enough. I know Python is a lot more OO, but when you're just writing a short script it looks a lot like Julia if Julia didn't need you to specify types.