Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pytensor/link/jax/dispatch/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def jax_funcify_Scan(op: Scan, **kwargs):

# Optimize inner graph (exclude any defalut rewrites that are incompatible with JAX mode)
rewriter = (
get_mode(op.mode).including("jax").excluding(*JAX._optimizer.exclude).optimizer
get_mode(op.mode)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically when op.mode is None, it will return a NumbaLinker if pytensor.config.linker="numba" or pytensor.config.mode="NUMBA".

.including("jax")
.excluding("numba", *JAX._optimizer.exclude)
.optimizer
)
rewriter(op.fgraph)
scan_inner_func = jax_funcify(op.fgraph, **kwargs)
Expand Down
Loading