Open
Description
In the example below the stacktrace is src/macros.jl:212
but it should have rather been the kernel function itself.
In general due to the code motion we are doing the line info nodes are rather messed up.
MethodError: no method matching __index_Global_Cartesian(::CartesianIndex{2})
Stacktrace:
[1] __index_Global_NTuple at /home/travis/build/JuliaGPU/KernelAbstractions.jl/src/KernelAbstractions.jl:214 [inlined]
[2] cpu_matmul_kernel! at /home/travis/build/JuliaGPU/KernelAbstractions.jl/src/macros.jl:212 [inlined]
[3] (::KernelAbstractions.var"#25#28"{Cassette.Context{nametype(CPUCtx),KernelAbstractions.CompilerMetadata{KernelAbstractions.NDIteration.DynamicSize,true,CartesianIndex{2},CartesianIndices{2,Tuple{Base.OneTo{Int64},Base.OneTo{Int64}}},KernelAbstractions.NDIteration.NDRange{2,KernelAbstractions.NDIteration.DynamicSize,KernelAbstractions.NDIteration.StaticSize{(4, 1)},CartesianIndices{2,Tuple{Base.OneTo{Int64},Base.OneTo{Int64}}},Nothing}},Nothing,KernelAbstractions.var"##PassType#253",Nothing,Cassette.DisableHooks},KernelAbstractions.Kernel{CPU,KernelAbstractions.NDIteration.StaticSize{(4,)},KernelAbstractions.NDIteration.DynamicSize,typeof(cpu_matmul_kernel!)},Tuple{Array{Float64,2},Array{Float64,2},Array{Float64,2}}})() at ./threadingconstructs.jl:126