Hi all,
I’ve just tagged and release CUDA.jl 2.0, with several new features: https://juliagpu.org/2020-10-02-cuda_2.0/
This release is slightly breaking because of the following changes:
- per-thread streams: unlikely to break anything since few people are using threads with CUDA.jl
- CUSPARSE clean-up: for example,
switch2XXX
methods are nowconvert
methods - array dispatch changes: view/reinterpret/reshape are now represented using Base’s wrappers.
This last point isn’t technically breaking, but it’s likely that some methods that still dispatch on ::CuArray
won’t get considered anymore now that, e.g., view(...) = ::SubArray{<:CuArray}
. As a result, fall-back Base methods might get used instead of CUDA-specific implementations, triggering scalar iteration or invalid pointer conversions (GPU array to CPU pointer). The fix is to use DenseCuArray
(if your method needs a CuPtr
), StridedCuArray
(for a CuPtr
+ strides) or AnyCuArray
(for anything that can be used in a kernel). Please file issues if you encounter this with array operations from CUDA.jl or GPUArrays.jl.
Finally, since this is a breaking release, dependent packages like Flux.jl still needs to be updated or bumped so many users won’t be able to install CUDA.jl 2.0 just yet.