Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pxl-th committed Jan 2, 2025
1 parent 2bd5843 commit d32aa01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tangent_types/thunks.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disable thunks for 2nd order AD.
_usethunks() = true
rrule(::typeof(_usethunks)) = false, (NoTangent(),)
rrule(::typeof(_usethunks)) = false, Returns((NoTangent(),))

abstract type AbstractThunk <: AbstractTangent end

Expand Down Expand Up @@ -146,9 +146,9 @@ macro thunk(body)
# so we get useful stack traces if it errors.
func = Expr(:->, Expr(:tuple), Expr(:block, __source__, body))
return quote
$(esc(_usethunks))() ?
_usethunks() ?
Thunk($(esc(func))) :
$(esc(func))()
$(esc(body))
end
end

Expand Down

0 comments on commit d32aa01

Please sign in to comment.