-
Notifications
You must be signed in to change notification settings - Fork 134
Add OpFromGraph
wrapper around alloc_diag
#915
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
jessegrabowski
merged 33 commits into
pymc-devs:main
from
jessegrabowski:alloc-diag-ofg
Jul 18, 2024
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
6857bea
Add `OpFromGraph` wrapper around `alloc_diag`
jessegrabowski 5604d9a
Refactor `rewrite_det_diag_to_prod_diag` to use `AllocDiag2`
jessegrabowski b0abe17
Save arguments passed to `alloc_diag` as properties in `AllocDiag2`
jessegrabowski dbfe92c
Fix bug in `rewrite_det_diag_to_prod_diag` where batch case was incor…
jessegrabowski afe2a65
Remove `AllocDiag2` from graphs in the `specialization` phase, after …
jessegrabowski e810df0
Remove debugging code, formatting
jessegrabowski a5355b6
Remove depreciated `AllocDiag` `Op`, rename `AllocDiag2 -> AllocDiag`
jessegrabowski 6e37d26
Correctly register `eagerly_inline_alloc_diag` as a JAX-only rewrite
jessegrabowski f6f27ec
Use `self` (not `type(self)`) in `OpFromGraph.make_node`
jessegrabowski 9486c64
Use base class `OpFromGraph` when constructing `OpFromGraph` gradients
jessegrabowski abcde3f
Revert "Use `self` (not `type(self)`) in `OpFromGraph.make_node`"
jessegrabowski 66013fc
Solve XY problem
jessegrabowski e7583d1
Appease mypy
jessegrabowski 70b9cd6
Remove `inline` prop from wrapper class and set `inline=True`
jessegrabowski 9605a0e
Set `inline = False`
jessegrabowski 46fbc55
Add rewrite to inline all `OpFromGraph` `Op`s
jessegrabowski 98cf641
Allow symbolic `offset`
jessegrabowski c76b54e
Exclude inline rewrite in JAX mode
jessegrabowski 7b44e22
refactor `late_inline_ofg` rewrite to actually perform the correct re…
jessegrabowski 1dfc3fc
Narrow scope of `late_inline` rewrite
jessegrabowski 9f32661
Fix tests
jessegrabowski f30a63f
Remove `is_inline` prop
jessegrabowski bf705f9
Add JAX `OpFromGraph` test
jessegrabowski c8958a4
Don't omit `inline_ofg` rewrites in JAX mode
jessegrabowski 665c766
Don't inline `KroneckerProduct`
jessegrabowski 6487e61
Skip inline rewrite tests when `mode == FAST_COMPILE`
jessegrabowski 43474fd
Incorporate review feedback
jessegrabowski 6ef4084
Incorporate review feedback
jessegrabowski 04ddb46
Add `is_zero_offset` helper to `Eye`
jessegrabowski c038109
Add `is_left_expand_dims` and `is_right_expand_dims` attributes to `D…
jessegrabowski 19f2895
Seed `test_local_lift_through_linalg` test
jessegrabowski fcbccde
Fix failing diag_rewrite test
jessegrabowski 56a3ffe
Revert symbolic offset
jessegrabowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.