Skip to content
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

Remove eigen and eigvals adjoints for Symmetric/Hermitian #875

Merged
merged 5 commits into from
Jan 9, 2021

Conversation

sethaxen
Copy link
Contributor

@sethaxen sethaxen commented Jan 7, 2021

JuliaDiff/ChainRules.jl#323 added rrules for eigen and eigvals for Symmetric/Hermitian matrices. This PR removes those rules from Zygote. Once the old tests pass, I'll remove them, since the rrules are more thoroughly tested.

Depends on JuliaRegistries/General#27508 is merged.

@sethaxen sethaxen closed this Jan 7, 2021
@sethaxen sethaxen reopened this Jan 7, 2021
@sethaxen sethaxen closed this Jan 7, 2021
@sethaxen sethaxen reopened this Jan 7, 2021
@sethaxen sethaxen closed this Jan 7, 2021
@sethaxen sethaxen reopened this Jan 7, 2021
@sethaxen
Copy link
Contributor Author

sethaxen commented Jan 7, 2021

Currently this fails because Zygote passes a Composite{Any} to the pullback for eigen, while ChainRules expects a Composite{<:Eigen}. @oxinabox what's the recommended way to handle this? Wait on #603 to remove the adjoint from Zygote, or change the pullback for eigen to take a Composite{Any}?

@oxinabox
Copy link
Member

oxinabox commented Jan 7, 2021

Accept Composite{Any
The primal type param here is just being used for extra checking

@sethaxen
Copy link
Contributor Author

sethaxen commented Jan 8, 2021

Okay, the test suite passed without the rule (except on Julia 1.3, which seems to have a CUDA issue), and the tests have now been removed, so this is ready for review.

test/gradcheck.jl Outdated Show resolved Hide resolved
@DhairyaLGandhi
Copy link
Member

Thanks, this looks good!

@DhairyaLGandhi
Copy link
Member

It'd be nice to keep tests if it's not too much, so we can test changes in Zygote more thoroughly as well

@sethaxen
Copy link
Contributor Author

sethaxen commented Jan 9, 2021

Okay, I added the tests back. This should now be ready to merge.

@DhairyaLGandhi
Copy link
Member

The failure on 1.3 is curious but not related to this PR, so wouldn't block it. Thanks!

@DhairyaLGandhi
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 9, 2021

Build succeeded:

@bors bors bot merged commit 52bcea8 into FluxML:master Jan 9, 2021
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.

3 participants