Skip to content

Unsupported keyword argument 'inbounds' with CUDA.jl #184

@albert-de-montserrat

Description

@albert-de-montserrat

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...) function foo!(A, B)
    A[I...] = B[I...]
    nothing
end
julia> @parallel inbounds=true (1:n, 1:n) foo!(A, B)
ERROR: LoadError: ArgumentError: Unsupported keyword argument 'inbounds'
Stacktrace:
 [1] var"@cuda"(__source__::LineNumberNode, __module__::Module, ex::Vararg{Any})
   @ CUDA ~/.julia/packages/CUDA/1kIOw/src/compiler/execution.jl:57

while this seems to work just fine on the CPU backend. Any chance I am misusing it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions