HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
JuliaGPU
CUDAnative.jl
Julia2017–2020
JuliaGPU / CUDAnative.jl · Archived

CUDAnative.jl

Julia support for native CUDA programming

7Distinct people
7Mentions
0Explicit recommenders
388GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Julia support for native CUDA programming

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month7 dated mentions

Observed mentions: 2017-10-27 07:53:48 UTC to 2020-04-09 17:57:57 UTC.

012017-10-01 00:00:00 UTC to 2017-11-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsOct 20172017-11-01 00:00:00 UTC to 2017-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-12-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2018-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-02-01 00:00:00 UTC to 2018-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-03-01 00:00:00 UTC to 2018-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-04-01 00:00:00 UTC to 2018-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-05-01 00:00:00 UTC to 2018-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-06-01 00:00:00 UTC to 2018-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-07-01 00:00:00 UTC to 2018-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-08-01 00:00:00 UTC to 2018-09-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-09-01 00:00:00 UTC to 2018-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-01 00:00:00 UTC to 2018-11-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-11-01 00:00:00 UTC to 2018-12-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-12-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-01-01 00:00:00 UTC to 2019-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJan 20192019-02-01 00:00:00 UTC to 2019-03-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-03-01 00:00:00 UTC to 2019-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-01 00:00:00 UTC to 2019-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-05-01 00:00:00 UTC to 2019-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-06-01 00:00:00 UTC to 2019-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-07-01 00:00:00 UTC to 2019-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-08-01 00:00:00 UTC to 2019-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-09-01 00:00:00 UTC to 2019-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-10-01 00:00:00 UTC to 2019-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-11-01 00:00:00 UTC to 2019-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-12-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2020-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-02-01 00:00:00 UTC to 2020-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-03-01 00:00:00 UTC to 2020-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-04-01 00:00:00 UTC to 2020-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Oct 20172017-10-01 00:00:00 UTC2017-11-01 00:00:00 UTC101
Nov 20172017-11-01 00:00:00 UTC2017-12-01 00:00:00 UTC000
Dec 20172017-12-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
Jan 20182018-01-01 00:00:00 UTC2018-02-01 00:00:00 UTC000
Feb 20182018-02-01 00:00:00 UTC2018-03-01 00:00:00 UTC000
Mar 20182018-03-01 00:00:00 UTC2018-04-01 00:00:00 UTC000
Apr 20182018-04-01 00:00:00 UTC2018-05-01 00:00:00 UTC000
May 20182018-05-01 00:00:00 UTC2018-06-01 00:00:00 UTC000
Jun 20182018-06-01 00:00:00 UTC2018-07-01 00:00:00 UTC000
Jul 20182018-07-01 00:00:00 UTC2018-08-01 00:00:00 UTC000
Aug 20182018-08-01 00:00:00 UTC2018-09-01 00:00:00 UTC101
Sep 20182018-09-01 00:00:00 UTC2018-10-01 00:00:00 UTC000
Oct 20182018-10-01 00:00:00 UTC2018-11-01 00:00:00 UTC101
Nov 20182018-11-01 00:00:00 UTC2018-12-01 00:00:00 UTC101
Dec 20182018-12-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
Jan 20192019-01-01 00:00:00 UTC2019-02-01 00:00:00 UTC000
Feb 20192019-02-01 00:00:00 UTC2019-03-01 00:00:00 UTC101
Mar 20192019-03-01 00:00:00 UTC2019-04-01 00:00:00 UTC000
Apr 20192019-04-01 00:00:00 UTC2019-05-01 00:00:00 UTC000
May 20192019-05-01 00:00:00 UTC2019-06-01 00:00:00 UTC000
Jun 20192019-06-01 00:00:00 UTC2019-07-01 00:00:00 UTC000
Jul 20192019-07-01 00:00:00 UTC2019-08-01 00:00:00 UTC000
Aug 20192019-08-01 00:00:00 UTC2019-09-01 00:00:00 UTC000
Sep 20192019-09-01 00:00:00 UTC2019-10-01 00:00:00 UTC000
Oct 20192019-10-01 00:00:00 UTC2019-11-01 00:00:00 UTC000
Nov 20192019-11-01 00:00:00 UTC2019-12-01 00:00:00 UTC000
Dec 20192019-12-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
Jan 20202020-01-01 00:00:00 UTC2020-02-01 00:00:00 UTC000
Feb 20202020-02-01 00:00:00 UTC2020-03-01 00:00:00 UTC000
Mar 20202020-03-01 00:00:00 UTC2020-04-01 00:00:00 UTC000
Apr 20202020-04-01 00:00:00 UTC2020-05-01 00:00:00 UTC101

What Hacker News says

7 sources
Technically, RNNs, including LSTMs, are already turing complete, neural turing machines mostly decoupled memory from the hidden layers so it can grow the memory size without a square increase on the number of parameters, which helps with the unbounded part of turing machines. it also helped inspire many attention based models that came after. Also matlab isn't really related here, and automatic differentiation is different from symbolic differentiation, the direct comparison are those python libs like tensorflow, pytorch and jax. Differentiable programming in the end is just a way of making something that you can already do better (just like you could create neural network long before theano/tensorflow/torch but it was not as streamlined). With a differentiable programming approach you can get something as dynamic as pytorch, with the per
Read the rest
formance optimizations and deploy capabilities of a tensorflow graph and with an easy way to plug any new operation and it's gradient by writing in the same host language (so no need to learn or restrict yourself the tensorflow/pytorch defined methods/DSL). You don't even need to change the compiler or define a new language for it. Julia's Zygote [1] is just a 100% Julia library you can import, for which you can add at any point any custom gradient even if the library creators never added them, and them run either on CPU or GPU (for which you can also fully extend using just pure Julia [2]). And of course, you can also use a higher level framework like Flux [3] which is also high level Julia code. I think the heart of differentiable programming is just another step in the evolution, from early (lua) torch-like libraries that gave you the high level blocks to compose, to autodiff libraries that gave you easy access to low level math operators to build the blocks to the point where you can easily create your own operators to create the high level blocks. [1] https://github.com/FluxML/Zygote.jl [2] https://github.com/JuliaGPU/CUDAnative.jl [3] https://github.com/FluxML/Flux.jl
In Swift: Google’s Bet on Differentiable Programming
In TensorFlow one doesn't write Python code and run it on a G/TPU, one writes Python code that uses an API to construct a TensorFlow graph computation which is compiled and runs on the G/TPU. It's really a completely separate programming language with different semantics and a totally separate runtime hiding behind a Python API. This is why you can't use any of Python's normal libraries, you have to use TensorFlow libraries. "Julia runs on GPUs" actually means that you write Julia code and it is compiled to natively run on GPUs [1]. Similarly, this post is about writing Julia code and compiling it to run natively on TPUs, not calling some predefined TPU library. Yes, of course you _can_ call libraries that are compiled for GPUs and TPUs—as you can in Python or any other language—but in Julia, nearly arbitrary user code can be compiled and
Read the rest
run on GPUs and TPUs. The major restriction on GPUs is that you cannot do dynamic allocation, so you need to write non-allocating Julia code, but that's common requirement for high-performance code anyway. [1] https://github.com/JuliaGPU/CUDAnative.jl
In Julia on Google TPU: Shakespeare RNN
I'll forward this to some of my GPU-expert-coauthors in the morning to see if they have a take on your questions. I think there's a few interesting facets here, though, so here's my take. > What's the most notable way the GPU in particular comes into play? Forward-mode and reverse-mode AD have different expressibility constraints on the kinds of programs that each can efficiently target in the face of dynamism, and GPUs also have fairly constrained programming models compared to the CPU. For me, a big part of the paper was the exploration of the intersection of these two sets of programmability constraints. Section 2.2.4 and the experimental sections explain some of this in detail, but I think one of the more surprising results was that the benefits of fusing dynamic control flow into the broadcasted derivative kernel outweighed potential
Read the rest
detriments e.g. warp divergence. It turns out newer GPU architectures give you more leeway in that regard than any of us on the team expected. > How does caching come into play? Depends on which kind of "caching" you're referring to. If you mean tape-level partial derivative caching/memory usage: Broadcasting a forward-mode derivative operator, as presented in this paper, can save on memory when it enables better fusion than reverse-mode on complicated kernels (resulting in fewer temporaries). However, there is also a question of when this technique should actually be employed: during the forward pass, or during the reverse pass? If employed in the forward pass, then the primal and partial derivative calculations can be fused, reducing compute cost. However, doing so means that the memory required to store the partial derivatives is held captive until those derivatives can be backpropagated in the reverse pass. Conversely, employing the technique in the reverse pass allows you to free the partial derivative storage quickly, but features some redundant computation. Section 2.2.3 of the paper discusses this a bit. If you mean instruction-level caching, i.e. efficient pipelining of memory into registers: On the CPU, it's quite easy to thrash cache for high-arity dual number calculations (i.e. calculations where dual number instances carry around a long stack-allocated array of partial derivatives). Our experiment in Section 3.4.1 tries to characterize the analogous GPU behavior by measuring how occupancy scales with target calculation arity. Also, there was definitely a bit of implementation work to ensure that loads from our GPU-backed "dual number" arrays coalesced properly, that indexing calculations were compiled away when possible, etc. The cool part is that the dual numbers themselves were just the implementation provided by the ForwardDiff package (https://github.com/JuliaDiff/ForwardDiff.jl), which contains no GPU-specific specialization, and they're automagically JIT-compiled for the GPU by CUDAnative (https://github.com/JuliaGPU/CUDAnative.jl). > What about intrinsic condensing functions? Hmm...I'm not positive I know what "intrinsic condensing functions" are. Apologies!
In Dynamic Automatic Differentiation of GPU Broadcast Kernels [pdf]
I think sometimes people are distracted by Julia's performance, according to https://github.com/JuliaLang/Microbenchmarks Julia is not the fastest language/compiler (maybe LuaJIT is). Julia is not only good for its performance, but also its multiple dispatch, its type system and more. Because of those features we have https://github.com/JuliaGPU/CUDAnative.jl, more elegant package interface, like https://github.com/JuliaOpt/JuMP.jl and there is more. I still believe there is no silver bullet, if you want something Python then you get another Python. But think about this: is the full Python's dynamic feature really what we need in works like simulation, HPC, etc.? Probably no. I think Julia is kinda of balance for the related field (like for scientific computing). Just like in the old days, people start using FORTRAN, MATLAB, Lisp as the m
Read the rest
ost advanced tools at that time. We start using Julia now.
In Julia 1.0
> This is in part because of the work by Google on the NVPTX LLVM back-end. I'm one of the maintainers at Google of the LLVM NVPTX backend. Happy to answer questions about it. As background, Nvidia's CUDA ("CUDA C++?") compiler, nvcc, uses a fork of LLVM as its backend. Clang can also compile CUDA code, using regular upstream LLVM as its backend. The relevant backend in LLVM was originally contributed by nvidia, but these days the team I'm on at Google is the main contributor. I don't know much (okay, anything) about Julia except what I read in this blog post, but the dynamic specialization looks a lot like XLA, a JIT backend for TensorFlow that I work on. So that's cool; I'm happy to see this work. Full debug information is not supported by the LLVM NVPTX back-end yet, so cuda-gdb will not work yet. We'd love help with this. :) Boun
Read the rest
ds-checked arrays are not supported yet, due to a bug [1] in the NVIDIA PTX compiler. [0] We ran into what appears to be the same issue [2] about a year and a half ago. nvidia is well aware of the issue, but I don't expect a fix except by upgrading to Volta hardware. [0] https://julialang.org/blog/2017/03/cudanative [1] https://github.com/JuliaGPU/CUDAnative.jl/issues/4 [2] https://bugs.llvm.org/show_bug.cgi?id=27738
In High-Performance GPU Computing in the Julia Programming Language

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.