Skip to content

RFC: turn off thunks at 2nd order #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

mcabbott
Copy link
Member

No description provided.

@@ -229,6 +232,8 @@ struct InplaceableThunk{T<:Thunk,F} <: AbstractThunk
val::T
end

InplaceableThunk(add!, val) = val # if _usethunks() disables @thunk, then bypass this too
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems wrong?

@@ -127,6 +127,9 @@ function LinearAlgebra.LAPACK.trsyl!(transa, transb, A, B, C::AbstractThunk, isg
return throw(MutateThunkException())
end

@inline _usethunks() = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt this needs an @inline

@oxinabox
Copy link
Member

oxinabox commented Aug 5, 2022

Why do we want to do this?

@mcabbott
Copy link
Member Author

mcabbott commented Aug 5, 2022

This was part of FluxML/Zygote.jl#1262 (comment), tl;dr is that everything 2nd order in Zygote is broken. Besides problems with the Z-to-CR bridge, the creation of thunks doesn't seem to be differentiable, and ProjectTo also gave problems. But far from sorted out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants