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

Fix reverse failure #1396

Merged
merged 10 commits into from
Mar 15, 2023
Merged

Fix reverse failure #1396

merged 10 commits into from
Mar 15, 2023

Conversation

simsurace
Copy link
Contributor

Addresses part of #1393 by adding an internal function _reverse that now has some specializations for known cases in which the fallback reverse fails. This preserves the general behavior that was introduced by #1376 while fixing the known bugs it introduced.

@simsurace
Copy link
Contributor Author

@mcabbott

src/lib/array.jl Outdated Show resolved Hide resolved
src/lib/array.jl Outdated Show resolved Hide resolved
test/lib/array.jl Outdated Show resolved Hide resolved
@mcabbott
Copy link
Member

Would be good to have some tests of an end use, i.e. gradient or perhaps pullback calls. These can be kept even if e.g. the whole implementation is deleted in favour of JuliaDiff/ChainRules.jl#671, or copied over to other AD systems.

simsurace and others added 2 commits March 15, 2023 09:11
@simsurace
Copy link
Contributor Author

Would be good to have some tests of an end use, i.e. gradient or perhaps pullback calls. These can be kept even if e.g. the whole implementation is deleted in favour of JuliaDiff/ChainRules.jl#671, or copied over to other AD systems.

I added the MWE from #1393. Any others that come to mind?

test/lib/array.jl Outdated Show resolved Hide resolved
@devmotion devmotion merged commit 2490c79 into FluxML:master Mar 15, 2023
@devmotion devmotion mentioned this pull request Mar 15, 2023
@simsurace simsurace deleted the fix-reverse branch March 15, 2023 10:32
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