Skip to content

[QNN EP] Expose device-level session options#19212

Merged
adrianlizarraga merged 3 commits intomainfrom
adrianl/qnn-device-options
Jan 22, 2024
Merged

[QNN EP] Expose device-level session options#19212
adrianlizarraga merged 3 commits intomainfrom
adrianl/qnn-device-options

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
@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.
@snnn
Copy link
Contributor

snnn commented Sep 5, 2025

This PR has been cherry-picked into the rel-1.17.0 branch in PR #19243. Removing the release:1.17.0 label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants