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

Mixed-mode sparse Jacobians #554

Merged
merged 16 commits into from
Nov 8, 2024
Merged

Mixed-mode sparse Jacobians #554

merged 16 commits into from
Nov 8, 2024

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Oct 8, 2024

Implement a new MixedMode backend which allows computing sparse Jacobians with a combination of forward and reverse modes.


DI source

  • Define MixedMode(forward, reverse) to store a combination of forward mode and reverse mode backends.
  • Implement a few traits and getters.

DI extensions

  • SparseMatrixColorings: Implement sparse Jacobian for MixedMode backends by computing two compressed matrices Br and Bc from a bidirectional coloring. Each sub-backend (forward and reverse) has its own separate process, the only common part is the joint decompression from SMC.

DI tests

  • Test MixedMode on sparse Jacobian scenarios.

DIT source

  • Tweak compatibility tests and batch size adaptation for new modes.

Chores

  • Bump DI to v0.6.22
  • Bump DIT to v0.8.5
  • Bump both their SMC compats to v0.4.9 (the release implementing bicoloring)

@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 94.18605% with 5 lines in your changes missing coverage. Please review.

Project coverage is 98.29%. Comparing base (efb5acf) to head (42b7ff6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
DifferentiationInterface/src/utils/batchsize.jl 50.00% 2 Missing ⚠️
DifferentiationInterface/src/utils/check.jl 0.00% 2 Missing ⚠️
DifferentiationInterface/src/utils/traits.jl 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #554      +/-   ##
==========================================
- Coverage   98.39%   98.29%   -0.11%     
==========================================
  Files         107      109       +2     
  Lines        4739     4813      +74     
==========================================
+ Hits         4663     4731      +68     
- Misses         76       82       +6     
Flag Coverage Δ
DI 98.47% <94.04%> (-0.16%) ⬇️
DIT 97.90% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@gdalle gdalle linked an issue Oct 9, 2024 that may be closed by this pull request
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 94.62366% with 5 lines in your changes missing coverage. Please review.

Project coverage is 97.71%. Comparing base (3094dca) to head (d4f85f9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...erentiationInterfaceTest/src/scenarios/scenario.jl 37.50% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #554      +/-   ##
==========================================
- Coverage   97.77%   97.71%   -0.06%     
==========================================
  Files         110      112       +2     
  Lines        5439     5522      +83     
==========================================
+ Hits         5318     5396      +78     
- Misses        121      126       +5     
Flag Coverage Δ
DI 98.95% <100.00%> (+0.02%) ⬆️
DIT 95.35% <37.50%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@gdalle gdalle marked this pull request as ready for review November 8, 2024 16:36
@gdalle gdalle changed the title Mixed mode Jacobians with bicoloring Mixed mode sparse Jacobians Nov 8, 2024
@gdalle gdalle changed the title Mixed mode sparse Jacobians Mixed-mode sparse Jacobians Nov 8, 2024
@gdalle gdalle merged commit 9a524d3 into main Nov 8, 2024
45 of 47 checks passed
@adrhill adrhill deleted the gd/bicoloring branch November 8, 2024 19:38
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.

Mixed mode Jacobian
2 participants