Skip to content

Commit

Permalink
CustomRules: fix body check (#1896)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Sep 26, 2024
1 parent 31c60be commit 0f7b355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules/customrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -977,15 +977,15 @@ 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
else
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
Expand Down

0 comments on commit 0f7b355

Please sign in to comment.