MWE:
julia> using GPUArrays, JLArrays, Random
julia> A = JLArray{Tuple{Int32}}(undef, 1000);
julia> rng = GPUArrays.RNG{JLArray}(42)
GPUArrays.RNG{JLArray}(0x000000000000002a, 0x0000000000000000)
julia> Random.rand!(rng, A);
ERROR: MethodError: rand!(::GPUArrays.RNG{JLArray}, ::JLArray{Tuple{Int32}, 1}) is ambiguous.
Candidates:
rand!(rng::GPUArrays.RNG{AT}, A::AbstractArray{T}) where {AT, T}
@ GPUArrays ~/.julia/packages/GPUArrays/V2qKA/src/host/random.jl:583
rand!(rng::AbstractRNG, A::AnyGPUArray)
@ GPUArrays ~/.julia/packages/GPUArrays/V2qKA/src/host/random.jl:602
To resolve the ambiguity, try making one of the methods more specific, or adding a new method more specific than any of the existing applicable methods.
Stacktrace:
[1] top-level scope
@ REPL[20]:1
MWE: