Skip to content

Add Const annotation for Enzyme #957

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

Merged
merged 1 commit into from
Jun 19, 2025
Merged

Add Const annotation for Enzyme #957

merged 1 commit into from
Jun 19, 2025

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Jun 19, 2025

This makes Enzyme happy enough to start an attempt at doing AD. It still fails (on DPPL 0.37), but that's already been reported upstream.

Once it starts passing, though, I'll need to benchmark it to see whether the closure is better or not.

@penelopeysm penelopeysm merged commit 8b67e96 into breaking Jun 19, 2025
7 of 20 checks passed
@penelopeysm penelopeysm deleted the py/enzyme-const branch June 19, 2025 17:09
Copy link
Contributor

github-actions bot commented Jun 19, 2025

Benchmark Report for Commit 361a639

Computer Information

Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × AMD EPYC 7763 64-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Benchmark Results

|                 Model | Dimension |  AD Backend |      VarInfo Type | Linked | Eval Time / Ref Time | AD Time / Eval Time |
|-----------------------|-----------|-------------|-------------------|--------|----------------------|---------------------|
| Simple assume observe |         1 | forwarddiff |             typed |  false |                  9.0 |                 1.6 |
|           Smorgasbord |       201 | forwarddiff |             typed |  false |                702.0 |                40.5 |
|           Smorgasbord |       201 | forwarddiff | simple_namedtuple |   true |                437.8 |                50.3 |
|           Smorgasbord |       201 | forwarddiff |           untyped |   true |               1000.2 |                35.9 |
|           Smorgasbord |       201 | forwarddiff |       simple_dict |   true |               6989.9 |                27.4 |
|           Smorgasbord |       201 | reversediff |             typed |   true |               1551.6 |                27.1 |
|           Smorgasbord |       201 |    mooncake |             typed |   true |               1067.9 |                 4.2 |
|    Loop univariate 1k |      1000 |    mooncake |             typed |   true |               6164.0 |                 3.8 |
|       Multivariate 1k |      1000 |    mooncake |             typed |   true |               1027.9 |                 8.9 |
|   Loop univariate 10k |     10000 |    mooncake |             typed |   true |              69163.8 |                 3.5 |
|      Multivariate 10k |     10000 |    mooncake |             typed |   true |               8853.4 |                10.0 |
|               Dynamic |        10 |    mooncake |             typed |   true |                142.1 |                12.5 |
|              Submodel |         1 |    mooncake |             typed |   true |                 13.6 |                 6.1 |
|                   LDA |        12 | reversediff |             typed |   true |               1281.1 |                 4.2 |

Copy link

codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.94%. Comparing base (3af63d5) to head (361a639).
Report is 1 commits behind head on breaking.

Additional details and impacted files
@@            Coverage Diff            @@
##           breaking     #957   +/-   ##
=========================================
  Coverage     82.94%   82.94%           
=========================================
  Files            38       38           
  Lines          4068     4068           
=========================================
  Hits           3374     3374           
  Misses          694      694           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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