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 Rule Type #346

Merged
merged 3 commits into from
Nov 4, 2024
Merged

Fix Rule Type #346

merged 3 commits into from
Nov 4, 2024

Conversation

willtebbutt
Copy link
Member

Reverts a change that was made in #339 . In that PR, I changed the implementation of rule_type in such a way that it didn't agree with what type inference produced when I actually derived a rule. This causes some problems, so I've reverted it.

A regression test has been added to catch the offending case, found by @penelopeysm in #345 . I've checked that this fixes the problem locally.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/test_resources.jl 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/interpreter/s2s_reverse_mode_ad.jl 91.60% <100.00%> (+0.09%) ⬆️
src/test_resources.jl 89.04% <0.00%> (-0.26%) ⬇️

Copy link
Contributor

github-actions bot commented Nov 4, 2024

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 │     69.8 │      1.0 │        5.51 │ missing │
│                  _sum_1000 │     6.69 │ 337000.0 │        34.4 │ missing │
│               sum_sin_1000 │     2.29 │     1.71 │        10.6 │ missing │
│              _sum_sin_1000 │     2.67 │    218.0 │        13.8 │ missing │
│                   kron_sum │     74.6 │     6.87 │       268.0 │ missing │
│              kron_view_sum │     53.5 │     8.61 │       208.0 │ missing │
│      naive_map_sin_cos_exp │     2.49 │  missing │        7.08 │ missing │
│            map_sin_cos_exp │      2.7 │     1.45 │        6.18 │ missing │
│      broadcast_sin_cos_exp │     2.57 │     2.26 │        1.46 │ missing │
│                 simple_mlp │     2.88 │     2.84 │        6.17 │ missing │
│                     gp_lml │      5.0 │     2.35 │     missing │ missing │
│ turing_broadcast_benchmark │     3.14 │  missing │        23.8 │ missing │
│         large_single_block │     4.13 │   4250.0 │        30.7 │ missing │
└────────────────────────────┴──────────┴──────────┴─────────────┴─────────┘

@willtebbutt willtebbutt merged commit 5469b81 into main Nov 4, 2024
29 checks passed
@willtebbutt willtebbutt deleted the wct/fix-rule-type branch November 4, 2024 23:58
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