What is the reason for this limitation in CuArrays?
When broadcasting, watch out for errors like:
julia> sin.(cos.(xs))
ERROR: CUDA error: invalid program counter (code #718, ERROR_INVALID_PC)
A current limitation of CUDAnative means that you'll need to restart Julia and use CUDAnative.sin, CUDAnative.cos etc in this case.
And how one should deal with them? I have this question because was trying to calculate entropy and get this error. So now I am using dispatch, but it looks not very convenient, may be better solution exists.
entropy(p::AbstractArray) = sum(-p .* log.(p))
entropy(p::CuArray) = sum(-p .* CUDAnative.log.(p))