Skip to content

Remove the Enzyme extension, prepare gradient #166

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 13 commits into from
Mar 7, 2025

Conversation

yebai
Copy link
Member

@yebai yebai commented Mar 5, 2025

Fix #160
Fix #101

For more details, open the Copilot Workspace session.

yebai and others added 10 commits March 5, 2025 22:52
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@yebai yebai requested a review from Red-Portal March 5, 2025 23:25
yebai and others added 2 commits March 5, 2025 23:31
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Benchmark suite Current: 3be1642 Previous: 78f72c2 Ratio
normal/RepGradELBO + STL/meanfield/Zygote 14980534698 ns 13974013690 ns 1.07
normal/RepGradELBO + STL/meanfield/ForwardDiff 3360287490.5 ns 3211615268 ns 1.05
normal/RepGradELBO + STL/meanfield/ReverseDiff 2999653700 ns 3131532845 ns 0.96
normal/RepGradELBO + STL/fullrank/Zygote 14810835957 ns 13849933317 ns 1.07
normal/RepGradELBO + STL/fullrank/ForwardDiff 3682730935.5 ns 3492231311 ns 1.05
normal/RepGradELBO + STL/fullrank/ReverseDiff 5441913254 ns 5683066697 ns 0.96
normal/RepGradELBO/meanfield/Zygote 6425100925 ns 6201262893 ns 1.04
normal/RepGradELBO/meanfield/ForwardDiff 2472716383 ns 2359526404 ns 1.05
normal/RepGradELBO/meanfield/ReverseDiff 1292234444.5 ns 1324194961.5 ns 0.98
normal/RepGradELBO/fullrank/Zygote 6500866779 ns 6292366580 ns 1.03
normal/RepGradELBO/fullrank/ForwardDiff 2751367950 ns 2542750514.5 ns 1.08
normal/RepGradELBO/fullrank/ReverseDiff 2419214101 ns 2457411409 ns 0.98
normal + bijector/RepGradELBO + STL/meanfield/Zygote 23254123961 ns 22364237807 ns 1.04
normal + bijector/RepGradELBO + STL/meanfield/ForwardDiff 10238288685 ns 10574430393 ns 0.97
normal + bijector/RepGradELBO + STL/meanfield/ReverseDiff 4293528199.5 ns 4523122442.5 ns 0.95
normal + bijector/RepGradELBO + STL/fullrank/Zygote 23446182027 ns 22344383227 ns 1.05
normal + bijector/RepGradELBO + STL/fullrank/ForwardDiff 11328482141 ns 10451369899 ns 1.08
normal + bijector/RepGradELBO + STL/fullrank/ReverseDiff 7455285269 ns 7691574124 ns 0.97
normal + bijector/RepGradELBO/meanfield/Zygote 14198751671 ns 14035631408 ns 1.01
normal + bijector/RepGradELBO/meanfield/ForwardDiff 9059050445 ns 8733272357 ns 1.04
normal + bijector/RepGradELBO/meanfield/ReverseDiff 2445393132 ns 2470858807 ns 0.99
normal + bijector/RepGradELBO/fullrank/Zygote 14562819368 ns 14173128951 ns 1.03
normal + bijector/RepGradELBO/fullrank/ForwardDiff 10012012606 ns 9560979502 ns 1.05
normal + bijector/RepGradELBO/fullrank/ReverseDiff 3838232280 ns 3960709638 ns 0.97

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Member

@Red-Portal Red-Portal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yebai , sorry for the delay, and thanks for dealing with this. I left some comments. I am also wondering if providing our own version of AutoEnzyme with the necessary configuration would be better.

@yebai
Copy link
Member Author

yebai commented Mar 6, 2025

I am also wondering if providing our own version of AutoEnzyme with the necessary configuration would be better.

The general rule is to avoid doing that to maintain consistency with ADTypes and the rest of the TuringLang ecosystem.

@yebai
Copy link
Member Author

yebai commented Mar 6, 2025

@Red-Portal, do you want to take over this PR?

@Red-Portal
Copy link
Member

Yes let me wrap it up. I now have time.

@Red-Portal Red-Portal changed the title Remove the Enzyme extension Remove the Enzyme extension, prepare gradient Mar 7, 2025
@yebai yebai merged commit 5ae466d into main Mar 7, 2025
13 of 16 checks passed
@yebai yebai deleted the yebai/remove-enzyme-extension branch March 7, 2025 20:28
@yebai
Copy link
Member Author

yebai commented Mar 7, 2025

Thanks @Red-Portal!

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.

Do we still need the Enzyme extension with DI? Enable prepare_gradient for DifferentiationInterface
2 participants