Tutorial on GPU programming on julia


I’m starting to appreciate CUDA programming in Julia, but find hard to learn how to do that properly since I can not find any tutorial or book on that. I’ve read the documentation about CuArrays.jl and CUDAnative.jl , but all that seem to be just a simple introduction showing capabilities, rather than tutorials… I hope I’m wrong, as I would appreciate some good docs to read and to learn from. Does anybody have a good recommendation for that? Thanks a lot,


Have a look at this one https://nextjournal.com/sdanisch/julia-gpu-programming


There’s not much documentation right now, I’m afraid. On the other hand, you don’t need as much CUDAnative/CuArrays-specific docs as you might thing: CUDAnative works at the CUDA C abstraction level, and there plenty of resources to learn that language, while CuArrays aims to provide the same usability as Base.Array. For GPU-specific additions, there’s some resources on the CuArrays.jl home page, including this slide deck.

Note that Simon’s GPUArrays-centric workflow explained in that blog post isn’t maintained, and instead I recommend people to use CuArrays directly as in this tutorial. GPUArrays.jl is still useful as an abstract container for GPU vendor-agnostic functionality, but not as a concrete type for direct use.


Thank you both for your input… I’ve read these two links before posting. They are great but only give a hint on how to start. I was looking for something more robust. Of course I can read about C-CUDA, but the idea was to avoid that and to get something self-contained for CUDA programming in Julia…
Thanks anyway :slight_smile:


Precompiling CuArrays
ERROR: LoadError: LoadError: UndefVarError: CUBLAS not defined

ERROR: UndefVarError: add not defined


This isn’t an appropriate topic to report such an issue.