From 0f7b3557e0c1791105718ae5417e30aae72cb27d Mon Sep 17 00:00:00 2001 From: William Moses Date: Thu, 26 Sep 2024 11:11:56 -0500 Subject: [PATCH] CustomRules: fix body check (#1896) --- src/rules/customrules.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rules/customrules.jl b/src/rules/customrules.jl index 1985283da3..cb6c60d98d 100644 --- a/src/rules/customrules.jl +++ b/src/rules/customrules.jl @@ -977,7 +977,7 @@ end !(aug_RT === Union{}) TapeT = EnzymeRules.tape_type(aug_RT) elseif (aug_RT isa UnionAll) && - (aug_RT <: EnzymeRules.AugmentedReturn) && + (aug_RT <: EnzymeRules.AugmentedReturn) && hasfield(typeof(aug_RT.body), :name) && aug_RT.body.name == EnzymeCore.EnzymeRules.AugmentedReturn.body.body.body.name if aug_RT.body.parameters[3] isa TypeVar TapeT = aug_RT.body.parameters[3].ub @@ -985,7 +985,7 @@ end TapeT = Any end elseif (aug_RT isa UnionAll) && - (aug_RT <: EnzymeRules.AugmentedReturnFlexShadow) && + (aug_RT <: EnzymeRules.AugmentedReturnFlexShadow) && hasfield(typeof(aug_RT.body), :name) && aug_RT.body.name == EnzymeCore.EnzymeRules.AugmentedReturnFlexShadow.body.body.body.name if aug_RT.body.parameters[3] isa TypeVar