-
Notifications
You must be signed in to change notification settings - Fork 536
Qualcomm AI Engine Direct - oss model enablement (EfficientSAM) #9266
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
Qualcomm AI Engine Direct - oss model enablement (EfficientSAM) #9266
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9266
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 42412d7 with merge base c9c5481 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "release notes: qualcomm" |
f36af71
to
1f614ea
Compare
@cccclai Thanks! |
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 for enabling EfficientSAM! As we enable more models, let's add it to part of the CI, similar to #8616
Regarding the CI, would you prefer I add it in this PR or add it in the next one? |
Next PR is fine |
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
def test_qnn_backend_cumsum(self): | ||
module = CumSum() # noqa: F405 | ||
sample_input = (torch.randn(4),) | ||
self.lower_module_and_test_output(module, sample_input) |
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.
It seems like the fp test is failing, can you double check? The quantized one is passing.
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.
Could you please share the log~?
Both the fp and quantized tests are passing from my side.
The error message is
|
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.
The error message is
[INFO] [Qnn ExecuTorch]: create QNN Logger with log_level 2 [WARNING] [Qnn ExecuTorch]: QnnDsp <W> Initializing HtpProvider [INFO] [Qnn ExecuTorch]: Initialize Qnn backend parameters for Qnn executorch backend type 2 [INFO] [Qnn ExecuTorch]: Caching: Caching is in SAVE MODE. [WARNING] [Qnn ExecuTorch]: QnnDsp <W> Performance Estimates unsupported [WARNING] [Qnn ExecuTorch]: QnnDsp <W> Arch 68 set by custom config is different from arch associated with SoC 57, will overwrite it to 75 [INFO] [Qnn ExecuTorch]: Running level=3 optimization. [INFO] [Qnn ExecuTorch]: Destroy Qnn backend parameters [INFO] [Qnn ExecuTorch]: Destroy Qnn context [INFO] [Qnn ExecuTorch]: Destroy Qnn device [INFO] [Qnn ExecuTorch]: Destroy Qnn backend [INFO] [Qnn ExecuTorch]: create QNN Logger with log_level 2 [INFO] [Qnn ExecuTorch]: Initialize Qnn backend parameters for Qnn executorch backend type 2 [INFO] [Qnn ExecuTorch]: Caching: Caching is in SAVE MODE. [WARNING] [Qnn ExecuTorch]: QnnDsp <W> Performance Estimates unsupported [WARNING] [Qnn ExecuTorch]: QnnDsp <W> Arch 68 set by custom config is different from arch associated with SoC 57, will overwrite it to 75 [INFO] [Qnn ExecuTorch]: Running level=3 optimization. /data/sandcastle/boxes/eden-trunk-hg-full-fbsource/buck-out/v2/gen/fbcode/ec7059d5161b31ff/executorch/backends/qualcomm/tests/fb/__test_qnn_delegate_simulator__/test_qnn_delegate_simulator#link-tree/executorch/backends/qualcomm/qnn_preprocess.py:69: Visiting: aten_cumsum_default, aten.cumsum.default [ERROR] [Qnn ExecuTorch]: tcm_migration.cc:1863:ERROR:no properties registered for q::QNN_CumulativeSum [ERROR] [Qnn ExecuTorch]: graph_prepare.cc:210:ERROR:could not create op: q::QNN_CumulativeSum [ERROR] [Qnn ExecuTorch]: graph_prepare.cc:1403:ERROR:Op 0x10 preparation failed with err:-1 [ERROR] [Qnn ExecuTorch]: QnnDsp <E> "aten_cumsum_default" generated: could not create op [ERROR] [Qnn ExecuTorch]: QnnDsp <E> RouterX86 graph prepare failed 12 [ERROR] [Qnn ExecuTorch]: QnnDsp <E> Failed to finalize graph (id: 1) with err 1002 [ERROR] [Qnn ExecuTorch]: Failed to finalize Qnn Graph with error: 1002 [ERROR] [Qnn ExecuTorch]: Fail to compile QNN graph FAIL [INFO] [Qnn ExecuTorch]: Destroy Qnn context [INFO] [Qnn ExecuTorch]: Destroy Qnn device [INFO] [Qnn ExecuTorch]: Destroy Qnn backend
I tried QNN versions 2.27
, 2.28
, 2.31
, and 2.32
with android-ndk-r26c
in this PR but still can't reproduce this error. I think I need more details to tackle this issue. Could you please check which QNN version you used? Also, check the QNN version in $LD_LIBRARY_PATH, thanks!
I'm currently using qnn 2.28, but not sure the android ndk version. It seems like there are quite a few fp tests continuously failing while most are passing. We can merge this PR for now, but will need some help to identify the root cause. See following for the failing fp tests, the one under fp but not marked are the passing tests.
We target |
Ah good catch. I inherit the base class |
It should be good now. Mind rebasing? |
d9135be
to
05fcdb6
Compare
I've rebased the branch. Thanks! I was on the older base in the last commit, but now it's on the newest one. |
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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!
Everything is green, looks like it's still need rebase...mind rebasing again? |
- e2e script for https://github.com/yformer/EfficientSAM - Fastvit breakage fix - Add support for cum_sum - Add bicubic interpolate transform pass - Fix stack op
4bb1800
to
42412d7
Compare
Done! |
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
### Summary - e2e script for https://github.com/yformer/EfficientSAM - Fastvit breakage fix - Add support for cum_sum - Add bicubic interpolate transform pass - Fix stack op ### Test plan ``` bash python ./examples/qualcomm/oss_scripts/efficientSAM/efficientSAM.py -m ${soc} -b build-android -H ${host_id} -s ${device_id} --oss_repo ${Path_to_oss_repo} --pretrained_weight ${Path_to_pretrained_weight} -d ${Path_to_dataset_dir} ```
…rch#9266) ### Summary - e2e script for https://github.com/yformer/EfficientSAM - Fastvit breakage fix - Add support for cum_sum - Add bicubic interpolate transform pass - Fix stack op ### Test plan ``` bash python ./examples/qualcomm/oss_scripts/efficientSAM/efficientSAM.py -m ${soc} -b build-android -H ${host_id} -s ${device_id} --oss_repo ${Path_to_oss_repo} --pretrained_weight ${Path_to_pretrained_weight} -d ${Path_to_dataset_dir} ```
Summary
Test plan