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

PiNodes with GlobalRefs and Constants #306

Merged
merged 3 commits into from
Oct 22, 2024
Merged

Conversation

willtebbutt
Copy link
Member

It appears to be the case that, as of 1.11, PiNodes are encountered in the wild which can contain constants. While I don't fully understand why these are necessary, handling them seems important to get e.g. Distributions.jl tests with certain kinds of truncations to work properly.

I believe that this will resolve #303 .

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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 │ Mooncake │   Zygote │ ReverseDiff │  Enzyme │
│                     String │   String │   String │      String │  String │
├────────────────────────────┼──────────┼──────────┼─────────────┼─────────┤
│                   sum_1000 │     70.1 │      1.0 │         5.5 │ missing │
│                  _sum_1000 │     6.89 │ 325000.0 │        34.2 │ missing │
│               sum_sin_1000 │      2.4 │     1.68 │        10.7 │ missing │
│              _sum_sin_1000 │     2.68 │    213.0 │        13.7 │ missing │
│                   kron_sum │     79.2 │     11.9 │       263.0 │ missing │
│              kron_view_sum │     51.2 │      8.2 │       192.0 │ missing │
│      naive_map_sin_cos_exp │     2.51 │  missing │        7.38 │ missing │
│            map_sin_cos_exp │     2.63 │     1.37 │        5.74 │ missing │
│      broadcast_sin_cos_exp │     2.63 │      3.1 │        1.46 │ missing │
│                 simple_mlp │     4.82 │     3.11 │        6.38 │ missing │
│                     gp_lml │     4.43 │     2.17 │     missing │ missing │
│ turing_broadcast_benchmark │     3.83 │  missing │        28.1 │ missing │
│         large_single_block │     4.06 │   4180.0 │        29.6 │ missing │
└────────────────────────────┴──────────┴──────────┴─────────────┴─────────┘

@willtebbutt willtebbutt merged commit 77f8861 into main Oct 22, 2024
21 checks passed
@willtebbutt willtebbutt deleted the wct/constant-pi-nodes branch October 22, 2024 09: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.

Rogue PiNodes: PiNode(:(Distributions.nothing), Nothing)
1 participant