Open
Description
MWE from https://discourse.julialang.org/t/check-bounds-no-causes-illegal-memory-access-when-using-rand-in-cuda-kernel/129455, run under --check-bounds=no
:
using CUDA
N = 10^5
A = CuArray{Float32}(undef, N)
idx = CUDA.zeros(Int, N)
CUDA.@sync sortperm!(idx, A)
ERROR: LoadError: CUDA error: an illegal memory access was encountered (code 700, ERROR_ILLEGAL_ADDRESS)