-
Notifications
You must be signed in to change notification settings - Fork 52
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
Export control-flow Ops in ppe.onnx.export #648
Conversation
/test |
/test |
|
||
@contextmanager | ||
def init_lax_state() -> Generator[None, None, None]: | ||
_lax_state.n_call = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memo: This attribute is to avoid duplicate name created by as_output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basic functionallity was LGTM 👍
Left few suggestion comment what I fealt reading code
/test |
I reflected your comments 🙇 @take-cheeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
Add functions to represent control flows in jax.lax (
fori_loop
,while_loop
,cond
)These functions trace only first iteration, then
ppe.onnx
insertsonnx::Loop
oronnx::If
operators to an exported ONNX as postprocess.