Add ONNX Sub Functions Export Feature for AutoModelForCausalLM#621
Merged
Add ONNX Sub Functions Export Feature for AutoModelForCausalLM#621
Conversation
92f320c to
acec54f
Compare
Contributor
|
Let's keep it uniform. Can we rename |
Contributor
Author
done. |
Contributor
Please modify the PR commit message and desp. accordingly. thanks |
quic-rishinr
requested changes
Nov 18, 2025
ochougul
requested changes
Nov 18, 2025
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Fix for this JIRA from Imagine team Signed-off-by: Ann Kuruvilla <akuruvil@qti.qualcomm.com> Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
65d24bc to
6daa209
Compare
Contributor
|
@abhishek-singh591 please rebase the PR |
ochougul
requested changes
Nov 19, 2025
quic-rishinr
requested changes
Nov 19, 2025
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
ochougul
approved these changes
Nov 19, 2025
Contributor
ochougul
left a comment
There was a problem hiding this comment.
Approving. Add todo for CustomOpTransform and merge once CI is passing.
quic-rishinr
approved these changes
Nov 19, 2025
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
Merged
abhishek-singh591
added a commit
to quic-rishinr/efficient-transformers
that referenced
this pull request
Nov 25, 2025
) This PR introduces support for exporting ONNX modules as **functions**, enabling more efficient model compilation and execution on hardware. - Added a new flag **`use_onnx_subfunctions`** to control ONNX function export behavior. - Integrated ONNX function export capability into the inference pipeline. Set the flag before running inference (either during export or compile): ```bash model.export(tmp_path, use_onnx_subfunctions=True) ``` This feature is **opt-in** and requires an explicit environment variable. Existing workflows remain unaffected when the flag is disabled. --------- Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com> Signed-off-by: Ann Kuruvilla <akuruvil@qti.qualcomm.com> Co-authored-by: quic-akuruvil <quic_akuruvil@quicinc.com> Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com>
quic-dhirajku
pushed a commit
to quic-dhirajku/efficient-transformers
that referenced
this pull request
Jan 2, 2026
) # ONNX Functions Export Support ## Overview This PR introduces support for exporting ONNX modules as **functions**, enabling more efficient model compilation and execution on hardware. ## Key Changes - Added a new flag **`use_onnx_subfunctions`** to control ONNX function export behavior. - Integrated ONNX function export capability into the inference pipeline. ## How to Enable ONNX Function Export Set the flag before running inference (either during export or compile): ```bash model.export(tmp_path, use_onnx_subfunctions=True) ``` ## Backward Compatibility This feature is **opt-in** and requires an explicit environment variable. Existing workflows remain unaffected when the flag is disabled. --------- Signed-off-by: abhishek-singh591 <sabhis@qti.qualcomm.com> Signed-off-by: Ann Kuruvilla <akuruvil@qti.qualcomm.com> Co-authored-by: quic-akuruvil <quic_akuruvil@quicinc.com> Signed-off-by: Dhiraj Kumar Sah <dhirajku@qti.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ONNX Functions Export Support
Overview
This PR introduces support for exporting ONNX modules as functions, enabling more efficient model compilation and execution on hardware.
Key Changes
use_onnx_subfunctionsto control ONNX function export behavior.How to Enable ONNX Function Export
Set the flag before running inference (either during export or compile):
Backward Compatibility
This feature is opt-in and requires an explicit environment variable. Existing workflows remain unaffected when the flag is disabled.