Relative Content

Tag Archive for cudajuliaarguments

What types can be passed as arguments to a CUDA kernel in Julia?

I am somewhat new to CUDA programming and I am trying to code a CUDA kernel function in Julia using CUDA.jl. However, I am confused as to what the restrictions are on the types that can be passed as arguments to the kernel. I have seen/heard things like the arguments have to be ‘isbits’ types, and/or they have to be immutable, and/or custom structs can’t be passed (unless they are first modified/adapted (e.g. using Adapt.jl) for the GPU). I have searched and haven’t been able to find any authoritative reference on this. For example, this page section is entitled ‘Inputs and Outputs’, but it seems to provide few details of what types can be passed as inputs.