-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shape_poly] Improve threefry with symbolic shapes
Previously, we could only handle threefry for the case when it was possible to tell statically that the size of the `count` array is even or odd. This meant that often we had to add a constraint that one of the dimensions is even. Here we rewrite the handling of threefry to not require a Python-level conditional about evenness of the size of the count array. We use a couple of `lax.dynamic_slice` rather than a `lax.split`. We also generalize the tests to cases where the size if fully symbolic, and we cannot tell statically that it is even.
- Loading branch information
Showing
4 changed files
with
47 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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 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 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 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