CUDAnative dynamic allocation

Yeah the only way to make that work is with statically known sizes:

using StaticArrays, CUDAnative

function myKern(::Val{n}) where n
val = MArray{Tuple{n}, Float32}(undef)
return nothing
end

@cuda threads=1 blocks=1 myKern(Val(2))

Should work.

1 Like