-
Notifications
You must be signed in to change notification settings - Fork 43
QNN Compilation path Support in QEFFBaseModel class. #335
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
QNN Compilation path Support in QEFFBaseModel class. #335
Conversation
4f60ecd
to
a84bec5
Compare
5bcedfe
to
4a4519b
Compare
4a4519b
to
4ba2c26
Compare
de8dbc3
to
2f352b6
Compare
739d571
to
ee2faf1
Compare
ac90ef3
to
619a718
Compare
…uic#357) This PR is created for resolving a typing mistake in the name of `QEFFAutoModelForImageTextToText ` in the `validate.md` Signed-off-by: Abukhoyer Shaik <[email protected]>
6c67b3c
to
c3fe1bb
Compare
Signed-off-by: Shubham Agrawal <[email protected]> Added enable_qnn as arg in _compile Signed-off-by: Shubham Agrawal <[email protected]> Reduced number of models tested for QNN, and skipped Whisper model Signed-off-by: Shubham Agrawal <[email protected]>
c3fe1bb
to
540232a
Compare
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.
Changed because of Format failure
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.
Changed because of Format failure
""" | ||
if enable_qnn: |
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.
I suggest to have two different python file qnn_compiler.py
and another qaic_compiler.py
, which will have all the code of compilation on both the different sdks. _compile method will route to the compilation based on passed parameters.@quic-rishinr
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.
Agree. Lets take it as a separate change post merging this PR.
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.
@quic-amitraj
Will take up the change to move _qnn_compile functionality to qnn_compile as a separate change because of the following reason:
qnn_compile function in qnn_compiler.py is also used by CLI commands for compilation which dumps qpcs into folder with name qpc_base_path/qpcs and qpcs compiled via QEFFBaseModel class should be dumped in qpc folder with config hash. Moving config hash creation in qnn_compile function will force CLI commands compilation as well to follow same directory structure and will fail CLI unit testing where the qpc folder to check is hard coded as "qpcs".
@@ -346,35 +370,27 @@ def _qnn_compile( | |||
onnx_path: Optional[str] = None, | |||
compile_dir: Optional[str] = None, | |||
*, | |||
custom_io: Optional[Dict[str, str]] = None, |
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.
After addressing then above comment there will be no need of this method to be here. All the preprocessing to compilation should be done inside the their specific file. This way we will have clean code and easier to understand.
@@ -117,7 +117,7 @@ pipeline { | |||
} | |||
stage('QNN Non-CLI Tests') { | |||
steps { | |||
timeout(time: 60, unit: 'MINUTES') { | |||
timeout(time: 200, unit: 'MINUTES') { |
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.
What is the expected time to pass this stage after this changes?
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.
timeout is set to 200 minutes in order to align with the similar stage of QAIC.
I have not been able to get a CI run completed after reducing the models to be tested on QNN. Should not take more than 30 mins.
1. Changed decode_only to prefill_only 2. Added comments for compiler_options in derived class compile API 3. Renamed test_models to test_models_qaic Signed-off-by: Shubham Agrawal <[email protected]>
This change will facilitate the support of QNN Compilation path for any model class derived from QEFFBaseModel class. --------- Signed-off-by: Shubham Agrawal <[email protected]>
This change will facilitate the support of QNN Compilation path for any model class derived from QEFFBaseModel class.