-
Notifications
You must be signed in to change notification settings - Fork 135
Vectorize fails on scan #1425
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
Comments
That compute_map thing is bs, anyway tweak scan to make it's own compute_map if not provided. |
How would you do that, something like this inside the if compute_map is None:
compute_map = {input: [[]] for input in inputs} ? |
if compute_map is None:
compute_map = {out: [False] for out in node.outputs} (Not sure if you need nested list or not) But better yet to change the make_thunk of Scan to not bother with compute_map if it's not provided. |
Note that Blockwise for Scan will likely not do the right thing if a scan has shared variables with updates. It should probably error out in that case. |
What about the random generators? |
Blockwise doesn't handle non-tensor inputs, so it will likely fail with an error |
that seems less than ideal. A rewrite to re-arrange the dims so the scan index is to the left and push the blockwise to the inner function? |
Worth trying. You'll have to explicitly broadcast batch dimensions before the transposition, so it can increase memory footprint. That's the saving that Blockwise gives you, but I don't see an easy general way to avoid it. |
This pins the version while the following gets resolved pymc-devs/pytensor#1425
Uh oh!
There was an error while loading. Please reload this page.
Description
MRE:
Traceback:
Full Traceback
The issue appears to be here. Blockwise specifically passes
None
as the compute_map when constructing the inner_thunk, but scan requries this compute map.The text was updated successfully, but these errors were encountered: