You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use the inbounds keyword with CUDA kernels I get the following Unsupported keyword argument 'inbounds' error:
using CUDA
using ParallelStencil
@init_parallel_stencil(CUDA, Float64, 2)
n =1024
A =@rand(n, n)
B =@zeros(n, n)
@parallel_indices (I...) functionfoo!(A, B)
A[I...] = B[I...]
nothingend
This keyword argument is for function definitions, not function calls (see ?@parallel).
In a function call, it will simply pass it further as an unknown keyword argument to the gpu backend. In the CPU case, unknown keyword arguments are assumed to be for the GPU backend and are simply ignored. This is why it appeared to be working in the CPU case for you.
That said, you can call @inbounds @parallel (1:n, 1:n) foo!(A, B), but at least as of now I don't think it has any effect in the GPU case.
When I try to use the
inbounds
keyword with CUDA kernels I get the followingUnsupported keyword argument 'inbounds'
error:while this seems to work just fine on the CPU backend. Any chance I am misusing it?
The text was updated successfully, but these errors were encountered: