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 World Age Problems #253

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Conversation

willtebbutt
Copy link
Member

I had introduced some fairly conservative world age checks in a previous PR, the purpose of which was to err on the side of caution, and insist that you only attempt to derive a rule based on the current world age. Unfortunately, this doesn't interact well with BenchmarkTools, because it typically progresses the world age, and you have to have constructed a rule by the time that a call to @benchmark is made.

This PR doesn't relax the world age assumption, but does make a point of updating the interpreter more regularly, to prevent it from getting behind.

@willtebbutt willtebbutt changed the title Wct/actually improve rrule integration Fix World Age Problems Sep 12, 2024
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/interpreter/s2s_reverse_mode_ad.jl 93.16% <100.00%> (+0.01%) ⬆️

Copy link
Contributor

Performance Ratio:
Ratio of time to compute gradient and time to compute function.
Warning: results are very approximate! See here for more context.

┌────────────────────────────┬────────┬─────────┬─────────────┬─────────┐
│                      Label │  Tapir │  Zygote │ ReverseDiff │  Enzyme │
│                     String │ String │  String │      String │  String │
├────────────────────────────┼────────┼─────────┼─────────────┼─────────┤
│                   sum_1000 │  108.0 │     0.9 │        5.41 │     1.8 │
│                  _sum_1000 │   7.96 │  1430.0 │        39.8 │   0.106 │
│               sum_sin_1000 │   2.43 │    1.59 │        10.7 │    1.01 │
│              _sum_sin_1000 │   3.09 │   355.0 │        17.0 │    1.51 │
│                   kron_sum │   62.8 │    10.6 │       201.0 │    9.99 │
│              kron_view_sum │   28.6 │    3.93 │        84.3 │    4.21 │
│      naive_map_sin_cos_exp │   3.18 │ missing │        10.1 │     2.8 │
│            map_sin_cos_exp │   4.68 │    1.76 │        7.52 │    3.58 │
│      broadcast_sin_cos_exp │    4.3 │    2.59 │        1.68 │    2.84 │
│                 simple_mlp │   8.11 │    3.11 │        13.6 │    3.16 │
│                     gp_lml │   17.1 │    6.42 │     missing │ missing │
│ turing_broadcast_benchmark │   7.24 │ missing │        36.3 │ missing │
│         large_single_block │   3.89 │  4040.0 │        30.5 │    2.23 │
└────────────────────────────┴────────┴─────────┴─────────────┴─────────┘

@willtebbutt willtebbutt merged commit 0390b34 into main Sep 12, 2024
17 checks passed
@willtebbutt willtebbutt deleted the wct/actually-improve-rrule-integration branch September 12, 2024 14:25
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