forked from pymc-devs/pytensor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement ScalarLoop in torch backend (pymc-devs#958)
* Add for loop based scalar loop * Pass all loop tests * Fetch constants from op * Add while loop test * Fix while loop and nasty stack over dtypes * Disable compile here based on CI result * Fix mypy signature * Remove unnecessary torch stack * Only call .cpu when necessary * Recursive false for torch compiler * Add elemwise test * Late import torch * Do iteration instead of vmap for elemwise * Clean up and add description * Add unit test to verify iteration * Refactor to ravel method * Fix unpacking Co-authored-by: Ricardo Vieira <[email protected]> * Fix comment * Remove extra return * Update test * Add single carry test * Remove compiler disable * Better name * Lint * Better docstring * Pr comments --------- Co-authored-by: Ian Schweer <[email protected]> Co-authored-by: Ricardo Vieira <[email protected]>
- Loading branch information
1 parent
07bd48d
commit 9858b33
Showing
4 changed files
with
165 additions
and
9 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