-
Notifications
You must be signed in to change notification settings - Fork 696
Qualcomm AI Engine Direct - Runtime Option #12297
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12297
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 1 Unrelated FailureAs of commit 6e04866 with merge base 07b6059 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
| * Currently we assume that the outputs are all fp32 tensors. | ||
| */ | ||
|
|
||
| #include <executorch/backends/qualcomm/runtime/QnnBackendOptions.h> |
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.
Is it needed to have these headers?
#include <executorch/backends/qualcomm/runtime/QnnBackendOptions.h>
#include <executorch/backends/qualcomm/runtime/QnnExecuTorchBackend.h>
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.
And these two
#include <executorch/runtime/backend/backend_option_context.h>
#include <executorch/runtime/backend/interface.h>
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.
Thanks for reviewing the PR and catching this.
Some of these headers are not required and I have removed them.
However, QnnExecuTorchBackend.h would still be required since the backend name variable QNN_BACKEND is inside QnnExecuTorchBackend.h. If there are any concerns, I can move this variable to somewhere else.
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.
I see, I'm just trying to understand what headers are required to be added to the runtime. What is the alternative option for the QNN_BACKEND variable?
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 have pushed a new commit that places all these macros under executorch/backends/qualcomm/runtime/QnnExecuTorch.h, so we don't need to include QnnExecuTorchBackend.h.
However, I will still need to include executorch/runtime/backend/interface.h since I need to call the set_options api.
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 see, I might refactor to move the set_options API. But let's merge this PR for now
83b19ef to
141c7be
Compare
|
Hmm lots of internal failure, might be easier if I move the API to <options.h> now |
Sure! I will rebase to mainline and change the header once the API is moved to <options.h> |
|
Actually can you make this one line change It seems fix the issue |
141c7be to
6e04866
Compare
I have the 1 line change fixed and also rebased to mainline. 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.
Thanks for adding the feature!
### Summary Supporting following options that can be set during both AOT and runtime: - Log Level - Performance Mode - Profiling Level ### Test plan - Log Level: Check `debug` message prefix exists. - Performance Mode: Ensure QNN SDK prints config log for performance, and ensure burst is faster than high power saver. - Profiling Level: Turn profiling off in compile spec and add profiling flag in runtime, ensure profiler gets expected number of events.
Summary
Supporting following options that can be set during both AOT and runtime:
Test plan
debugmessage prefix exists.