From c954cde6d667b0d652dd87348a79d08e83f00d5b Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 10 Nov 2025 13:39:51 -0600 Subject: [PATCH] More robust error message on method compilation failure --- src/jlgen.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/jlgen.jl b/src/jlgen.jl index f9cf153c..1755794d 100644 --- a/src/jlgen.jl +++ b/src/jlgen.jl @@ -614,7 +614,9 @@ function ci_cache_populate(interp, cache, mi, min_world, max_world) # inference should have populated our cache wvc = WorldView(cache, min_world, max_world) - @assert CC.haskey(wvc, mi) + if !CC.haskey(wvc, mi) + throw(AssertionError("GPUCompiler: Failed to compile method for $mi, between worlds $min_world and $max_world")) + end ci = CC.getindex(wvc, mi) # if ci is rettype_const, the inference result won't have been cached @@ -629,7 +631,10 @@ function ci_cache_populate(interp, cache, mi, min_world, max_world) # inference should have populated our cache wvc = WorldView(cache, min_world, max_world) - @assert CC.haskey(wvc, mi) + + if !CC.haskey(wvc, mi) + throw(AssertionError("GPUCompiler: Failed to compile method for $mi, between worlds $min_world and $max_world")) + end ci = CC.getindex(wvc, mi) # if ci is rettype_const, the inference result won't have been cached