Skip to content

Commit f207a05

Browse files
authored
Tape type of error (#1666)
1 parent 21f9751 commit f207a05

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Enzyme.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,8 +722,12 @@ end
722722
Val(codegen_world_age(eltype(FA), primal_tt))
723723
end
724724
nondef = Enzyme.Compiler.thunk(opt_mi, FA, A, TT, #=Split=# Val(API.DEM_ReverseModeGradient), Val(width), ModifiedBetween, #=ReturnPrimal=#Val(ReturnPrimal), #=ShadowInit=#Val(false), RABI)
725-
TapeType = EnzymeRules.tape_type(nondef[1])
726-
return TapeType
725+
if nondef[1] isa Enzyme.Compiler.PrimalErrorThunk
726+
return Nothing
727+
else
728+
TapeType = EnzymeRules.tape_type(nondef[1])
729+
return TapeType
730+
end
727731
end
728732

729733
const tape_cache = Dict{UInt, Type}()

0 commit comments

Comments
 (0)