Skip to content
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 EP] Expose device-level session options #19212

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

adrianlizarraga
Copy link
Contributor

Description

  • Adds the following session options to configure the device:
    • soc_model: The SoC model number. Refer to the QNN SDK documentation for valid values. Defaults to "0" (unknown).
    • htp_arch: The minimum HTP architecture the driver will use to select compatible QNN operators.
    • device_id: The ID of the device to use when setting 'htp_arch'. Defaults to "0" (for single device).

Motivation and Context

Allow more configuration.

@adrianlizarraga adrianlizarraga marked this pull request as ready for review January 20, 2024 00:56
@jywu-msft
Copy link
Member

Thanks!
probably not as urgent but we may want to look into configs for dsp backend too (as we may want to expand to Android support for legacy devices) in the future

jywu-msft
jywu-msft previously approved these changes Jan 20, 2024
@HectorSVC
Copy link
Contributor

'qnn_saver_path', 'htp_graph_finalization_optimization_mode', 'qnn_context_priority'])");

add new keys here also.


Refers to: onnxruntime/test/perftest/ort_test_session.cc:387 in b53b58f. [](commit_id = b53b58f, deletion_comment = False)

@HectorSVC
Copy link
Contributor

'qnn_saver_path', 'htp_graph_finalization_optimization_mode', 'qnn_context_priority'])");

add new keys here also


Refers to: onnxruntime/test/onnx/main.cc:531 in b53b58f. [](commit_id = b53b58f, deletion_comment = False)

@adrianlizarraga
Copy link
Contributor Author

'qnn_saver_path', 'htp_graph_finalization_optimization_mode', 'qnn_context_priority'])");

add new keys here also

Refers to: onnxruntime/test/onnx/main.cc:531 in b53b58f. [](commit_id = b53b58f, deletion_comment = False)

Thanks @HectorSVC . I added the keys to both files.

Copy link
Contributor

@HectorSVC HectorSVC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@adrianlizarraga adrianlizarraga merged commit 8d9d751 into main Jan 22, 2024
93 of 94 checks passed
@adrianlizarraga adrianlizarraga deleted the adrianl/qnn-device-options branch January 22, 2024 20:47
YUNQIUGUO pushed a commit that referenced this pull request Jan 23, 2024
### Description
- Adds the following session options to configure the device:
- `soc_model`: The SoC model number. Refer to the QNN SDK documentation
for valid values. Defaults to "0" (unknown).
- `htp_arch`: The minimum HTP architecture the driver will use to select
compatible QNN operators.
- `device_id`: The ID of the device to use when setting 'htp_arch'.
Defaults to "0" (for single device).

### Motivation and Context
Allow more configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants