-
Notifications
You must be signed in to change notification settings - Fork 24
feat: add outside values to while loop argument list #1673
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
base: main
Are you sure you want to change the base?
Conversation
wsmoses
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GleasonK i vaguely recall there being an existing stablehlo pass for this?
b7f68b1 to
fed98ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EnzymeJAX Benchmarks
| Benchmark suite | Current: 90beba7 | Previous: f603104 | Ratio |
|---|---|---|---|
scatter_sum / JaX / cpu / Primal |
0.0000042210789993987415 s |
0.000004260189699562034 s |
0.99 |
scatter_sum / JaXPipe / cpu / Primal |
0.000004273433900380042 s |
0.000004406429699884029 s |
0.97 |
scatter_sum / JaX / tpu / Primal |
0.0001627930903006 s |
0.0001248841227003 s |
1.30 |
scatter_sum / JaXPipe / tpu / Primal |
0.0001470225415003 s |
0.0001351668211995 s |
1.09 |
This comment was automatically generated by workflow using github-action-benchmark.
|
IT seems to be done during MLIR HLO to HLO conversion: https://github.com/openxla/xla/blob/c6315cd85539fac2c08ed33dbe25e006f41ce72b/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc#L5053-L5065 |
src/enzyme_ad/jax/Passes/WhileLoopOutsideValuesAddToArgumentListPass.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Paul Berg <[email protected]>
49f1f69 to
90beba7
Compare
|
We have:
An improvement to the prepareExplicitCapture for whileop would be to only sink smaller constants or single-use constants into the while body, converting larger shared constants into arguments. |
This will likely fix the issue with tt that @giordano reported some time back.