-
Notifications
You must be signed in to change notification settings - Fork 498
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
Add instruction for exporting inlined constant #8707
base: master
Are you sure you want to change the base?
Conversation
docs/source/features/stablehlo.md
Outdated
@@ -64,6 +64,31 @@ print(stablehlo.mlir_module()) | |||
The second to last line we used `jax.ShapedDtypeStruct` to specify the input shape. | |||
You can also pass a numpy array here. | |||
|
|||
### Inline some weights in generated stablehlo | |||
|
|||
Suppose that you want to inline some (or all) of the model's weight |
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.
Suggest:
You can inline some or all of your model's weights into the StableHLO graph as constants by exporting a separate function that calls your model.
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.
done.
docs/source/features/stablehlo.md
Outdated
into the generated StableHLO graph as constant. You can accomplish it by | ||
exporting a different function that calls your model. | ||
|
||
The convention used in `jax.jit` is that, all the input of the `jit`'d python |
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.
Suggest: The convention used in jax.jit
is all inputs to jit
ed Python functions are exported as parameters, everything else is inlined as constants.
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.
done.
No description provided.