Passing `::Type{InconcreteType}` to CUDA kernel

Arguments are allowed if they’re ghost types or const types:

julia> Core.Compiler.isconstType(Type{Int})
true

julia> Core.Compiler.isconstType(Type{Number})
true

julia> Core.Compiler.isconstType(Type{Array})
false

So that doesn’t hold for your incomplete type.

That said, at some point in the past we used to support passing other arguments, as long as they were unused. Some code supporting that remains, GPUCompiler.jl/src/validation.jl at 85316c7f9f962667121ca8c2455b7a1e5993fd6b · JuliaGPU/GPUCompiler.jl · GitHub and CUDA.jl/src/compiler/execution.jl at 71311afa35463f3fce09ed73bae66f8810b5e821 · JuliaGPU/CUDA.jl · GitHub, so if this would work for you, open an issue or have a look at the GPUCompiler.jl git history to add this support back. Looks like it got lost in Clean-up version checks. · JuliaGPU/GPUCompiler.jl@eec85d5 · GitHub.

1 Like