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 interface #98

Merged
merged 1 commit into from
Mar 24, 2024
Merged

Fix interface #98

merged 1 commit into from
Mar 24, 2024

Conversation

willtebbutt
Copy link
Member

Fortunately, #97 was a bug in the interface, not the underlying functionality.

I forgot to the copy the output of the forwards-pass before running the reverse-pass, which is necessary in general because the reverse-pass restores the state of data to the state it was initialised to. For arrays, this is whatever it was allocated as, which is non-deterministic.

Anyway @gdalle this should fix your problem. Will merge when CI passes.

Copy link
Contributor

Performance Ratio:

┌────────────────────────────┬────────┬─────────┬─────────────┬─────────┐
│                      Label │  Taped │  Zygote │ ReverseDiff │  Enzyme │
│                     String │ String │  String │      String │  String │
├────────────────────────────┼────────┼─────────┼─────────────┼─────────┤
│                        sum │  125.0 │   0.403 │        2.76 │   0.664 │
│                       _sum │   26.4 │   481.0 │        27.9 │   0.136 │
│                   kron_sum │  196.0 │    3.55 │       196.0 │    23.1 │
│              kron_view_sum │  238.0 │    10.7 │       226.0 │     8.0 │
│      naive_map_sin_cos_exp │   7.91 │ missing │        8.02 │    2.53 │
│            map_sin_cos_exp │   10.8 │    1.71 │        7.83 │     3.4 │
│      broadcast_sin_cos_exp │   9.96 │    2.58 │        1.65 │    2.81 │
│                 simple_mlp │   24.1 │    3.04 │        11.6 │    3.84 │
│                     gp_lml │   43.9 │    4.38 │     missing │ missing │
│ turing_broadcast_benchmark │   19.5 │ missing │        35.8 │ missing │
└────────────────────────────┴────────┴─────────┴─────────────┴─────────┘

@willtebbutt willtebbutt merged commit 93814a9 into main Mar 24, 2024
12 checks passed
@willtebbutt willtebbutt deleted the wct/fix-value-and_pullback branch March 24, 2024 12:42
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.

1 participant