The following MWE returns a kernel of type Union{} for a 2D dynamic kernel with at least one argument being a view(). The kernel compiles fine if the dynamic kernel is 1D or has no view() arguments.
I’d be much obliged for a fix to this problem. I can work around it, but not easily.
– Paul
using CUDA
function level1!(sum, vec1, vec2)
@cuda dynamic=true threads=(16,16) blocks=(16,16) level2!(sum, view(vec1,:), vec2)
return nothing
end
function level2!(sum, vec1, vec2)
return nothing
end
sum = zeros(Float32, 1616, 1616)
vec1 = ones(Float32, 1616)
vec2 = ones(Float32, 1616)
@cuda threads=(16,16) blocks=(16,16) level1!(CuArray(sum), CuArray(vec1), CuArray(vec2))