You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Fixed since Cassette was removed (#288) and the CPU back end compiles kernels like a GPU back end (#556): compile errors and, with julia -g2, kernel exceptions now point at the line in the @kernel body.
Activity
vchuravy commentedon Apr 25, 2023
Doing something like JuliaLang/julia#49488 would help.
maleadt commentedon Oct 19, 2026
Fixed since Cassette was removed (#288) and the CPU back end compiles kernels like a GPU back end (#556): compile errors and, with
julia -g2, kernel exceptions now point at the line in the@kernelbody.