From e8f35570ed825b63bbd87b7f5f86f798e9ecace8 Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Sun, 1 Dec 2024 16:14:40 -0500 Subject: [PATCH 1/2] Further reduce recursive inference --- src/compiler/interpreter.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/interpreter.jl b/src/compiler/interpreter.jl index 7b48acf271..d0194659f7 100644 --- a/src/compiler/interpreter.jl +++ b/src/compiler/interpreter.jl @@ -799,8 +799,6 @@ function abstract_call_known( if Base.isconcretetype(bcty) && bcty <: Base.Broadcast.Broadcasted{<:Base.Broadcast.DefaultArrayStyle, Nothing} && all(array_or_number, bcty.parameters[4].parameters) && any(Base.Fix2(Base.:<:, AbstractArray), bcty.parameters[4].parameters) fnty = bcty.parameters[3] eltys = map(num_or_eltype, bcty.parameters[4].parameters) - retty = Core.Compiler._return_type(interp, Tuple{fnty, eltys...}) - if Base.isconcretetype(retty) arginfo2 = ArgInfo( fargs isa Nothing ? nothing : [:(Enzyme.Compiler.Interpreter.override_bc_materialize), fargs[2:end]...], @@ -814,7 +812,6 @@ function abstract_call_known( sv::AbsIntState, max_methods::Int, ) - end end end From 380cb5cce6dd3d596645d49df45af3308690fbe3 Mon Sep 17 00:00:00 2001 From: Billy Moses Date: Sun, 1 Dec 2024 16:17:03 -0500 Subject: [PATCH 2/2] fix --- src/compiler/interpreter.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/compiler/interpreter.jl b/src/compiler/interpreter.jl index d0194659f7..ff4c6c991b 100644 --- a/src/compiler/interpreter.jl +++ b/src/compiler/interpreter.jl @@ -797,8 +797,6 @@ function abstract_call_known( if f === Base.materialize && length(argtypes) == 2 bcty = widenconst(argtypes[2]) if Base.isconcretetype(bcty) && bcty <: Base.Broadcast.Broadcasted{<:Base.Broadcast.DefaultArrayStyle, Nothing} && all(array_or_number, bcty.parameters[4].parameters) && any(Base.Fix2(Base.:<:, AbstractArray), bcty.parameters[4].parameters) - fnty = bcty.parameters[3] - eltys = map(num_or_eltype, bcty.parameters[4].parameters) arginfo2 = ArgInfo( fargs isa Nothing ? nothing : [:(Enzyme.Compiler.Interpreter.override_bc_materialize), fargs[2:end]...],