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 Terminator Issue #478

Merged
merged 9 commits into from
Feb 13, 2025
Merged

Fix Terminator Issue #478

merged 9 commits into from
Feb 13, 2025

Conversation

willtebbutt
Copy link
Member

Per discussions in #389 and #397 , this changes the normalisation pass to ensure that the CFG doesn't change. Another approach would have been to continue with how things are currently done and to properly reflect the changes in the CFG, but that would have been more work, and not obviously improved things further.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 90.90909% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/interpreter/ir_normalisation.jl 90.69% 4 Missing ⚠️
Files with missing lines Coverage Δ
src/interpreter/ir_utils.jl 87.50% <100.00%> (ø)
src/interpreter/ir_normalisation.jl 90.21% <90.69%> (+0.14%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Contributor

github-actions bot commented Feb 12, 2025

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

┌────────────────────────────┬──────────┬──────────┬─────────┬─────────────┬─────────┐
│                      Label │   Primal │ Mooncake │  Zygote │ ReverseDiff │  Enzyme │
│                     String │   String │   String │  String │      String │  String │
├────────────────────────────┼──────────┼──────────┼─────────┼─────────────┼─────────┤
│                   sum_1000 │ 100.0 ns │      1.8 │     1.1 │         5.5 │    8.21 │
│                  _sum_1000 │ 941.0 ns │     6.81 │  1570.0 │        36.6 │    1.07 │
│               sum_sin_1000 │  6.56 μs │     2.24 │    1.68 │        11.0 │    2.02 │
│              _sum_sin_1000 │   5.3 μs │     2.61 │   308.0 │        13.8 │    2.41 │
│                   kron_sum │ 343.0 μs │     39.8 │    3.69 │       201.0 │    8.72 │
│              kron_view_sum │ 338.0 μs │     43.0 │    9.71 │       217.0 │    98.9 │
│      naive_map_sin_cos_exp │  2.13 μs │      2.2 │ missing │        8.24 │    2.32 │
│            map_sin_cos_exp │  2.16 μs │     2.43 │    1.54 │        6.17 │    2.87 │
│      broadcast_sin_cos_exp │  2.21 μs │     2.31 │    2.31 │        1.48 │    2.25 │
│                 simple_mlp │ 427.0 μs │     4.61 │    2.96 │        7.28 │    3.37 │
│                     gp_lml │ 538.0 μs │     4.91 │    2.39 │     missing │    3.87 │
│ turing_broadcast_benchmark │  2.03 ms │     3.35 │ missing │        31.6 │ missing │
│         large_single_block │ 390.0 ns │     4.03 │  4420.0 │        30.7 │    2.18 │
└────────────────────────────┴──────────┴──────────┴─────────┴─────────────┴─────────┘

@willtebbutt
Copy link
Member Author

It looks like this might have caused a small performance regression. I'm going to try a couple of things locally to resolve.

@willtebbutt
Copy link
Member Author

Coverage failure is due to a chunk of code which is should only throw if something goes badly wrong -- everything else appears to be covered. I'm going to try to add a unit test for kill_edge!, but then I'll merge + tag.

@willtebbutt
Copy link
Member Author

Unit test added. Will merge when CI (other than coverage) passes.

@willtebbutt willtebbutt merged commit 76e47dd into main Feb 13, 2025
73 of 74 checks passed
@willtebbutt willtebbutt deleted the wct/fix-terminator-issue branch February 13, 2025 09:24
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