CuArrays
The CuArrays package is probably the most significant part of the GPU ecosystem in Julia. It provides an array type for storing data on the GPU and operating on it. Since GPU code needs to be vectorized, an array is the primary data type that needs to be used in all cases.
A CuArray datatype can be created by calling its constructor with a regular Julia array. Once created, GPU kernels may be called on it. The package includes kernels for basic mathematical operators, which are typically called via dot-broadcast. As with all broadcasts in Julia, the operations are fused, which means that on the GPU, a single fused kernel is run on the array, even though multiple operations exist on the source. In other words, the power, subtraction, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access