Live data from Hacker News

Interactive GPU Programming, Part 1: Hello CUDA

dragan.rocks

1–10 of 30 posts

Re: Interactive GPU Programming, Part 1: Hello CUDA

#3
From the perspective of a CUDA beginner, this doesn't seem simpler than writing CUDA with C(not C++, just C). If you're going to pick up CUDA, starting with C means you get the best tooling support and community docs. Not to mention that managing pointers and explicit types in C will genuinely help your understanding of how CPU-GPU works.

If you already know Clojure, this is probably the best chance to extend something you already love using. If you don't, you're probably better off learning either CUDA or Clojure rather than both at the same time. Debugging CUDA errors are already painful, I wouldn't add a new host language on top of that.

For context, I'm currently taking my school's GPGPU course. We've just started actually writing non-trivial code.

Re: Interactive GPU Programming, Part 1: Hello CUDA

#4
post #3

From the perspective of a CUDA beginner, this doesn't seem simpler than writing CUDA with C(not C++, just C). If you're going to pick up CUDA, starting with C means you get the best tooling support and community docs. Not to mention that managing pointers and explicit types in C will genuinely help your understanding of how CPU-GPU works. If you already know Clojure, this is probably the best chance to extend somethi…

Note the word Interactive. That's not something you'll get in the plain C tutorial.

Re: Interactive GPU Programming, Part 1: Hello CUDA

#5
post #3

From the perspective of a CUDA beginner, this doesn't seem simpler than writing CUDA with C(not C++, just C). If you're going to pick up CUDA, starting with C means you get the best tooling support and community docs. Not to mention that managing pointers and explicit types in C will genuinely help your understanding of how CPU-GPU works. If you already know Clojure, this is probably the best chance to extend somethi…

you should give it a shot, interactively working with stuff is an excellent learning experience; my 11 year old daughter is having a great time, she might be a bit stunned if i said "here now you have to do it like this in C"

Re: Interactive GPU Programming, Part 1: Hello CUDA

#6
post #3

From the perspective of a CUDA beginner, this doesn't seem simpler than writing CUDA with C(not C++, just C). If you're going to pick up CUDA, starting with C means you get the best tooling support and community docs. Not to mention that managing pointers and explicit types in C will genuinely help your understanding of how CPU-GPU works. If you already know Clojure, this is probably the best chance to extend somethi…

The development feedback loop is incredibly tight when using a clojure (or lisp in general) repl. The interactivity lets you interactively develop your code, including ( it appears) the C/cuda code since you can call out to compile it at the repl and then upload it to the GPU for execution.

Re: Interactive GPU Programming, Part 1: Hello CUDA

#9
Okay, so it's easier then directly using the the CUDA, etc., C toolchains, perhaps, but why not compare to Python + Numba, which has been available with GPU support for quite a while, and likewise avoids direct exposure to the underlying C toolchains, provides interactive compilation, can be used with a nice REPL (or, Jupyter Notebook), etc.?

Re: Interactive GPU Programming, Part 1: Hello CUDA

#10
I hope CUDA will get replaced by Vulkan merged with whatever core OpenCL features it still needs.

Looks like Khronos are looking into converging them in some way: https://www.pcper.com/reviews/Graphics-Cards/Follow-Neil-Tre...

CUDA unfortuantely is Nvidia's lock-in, so not a good way forward.

Post reply on HN