Skip to content
Open
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
6 changes: 5 additions & 1 deletion torax/_src/jax_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,11 @@ def _instantiate_zeros(g: PyTree) -> PyTree:
)


class WhileLoopBoundedWhileLoop(hijax.VJPHiPrimitive):
HiPrim = (hijax.VJPHiPrimitive if jax.__version_info__ <= (0, 11, 1) else
hijax.HiPrim)


class WhileLoopBoundedWhileLoop(HiPrim):
"""A bounded differentiable while_loop using jax.lax.while_loop."""

def __init__(
Expand Down
Loading