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] Passthrough EP Parameters in Node #23468

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

joncamp
Copy link
Contributor

@joncamp joncamp commented Jan 23, 2025

Description

The existing implementation of session options for the QNN EP does not honor the various bindings available. As such, even if set at runtime they are ignored. Fix is to follow the pattern of the webgpu provider and parse/populate the options accordingly.

Existing defaults are preserved, such that if options are not set the prior behavior will persist.

Motivation and Context

During debugging and development of Node implementations using the QNN EP the need to set various parameters became apparent. Currently the parameters can only be set via changes to the ORT dll code itself, which is inflexible and slows development.

@jywu-msft jywu-msft requested a review from fs-eire January 23, 2025 01:35
@HectorSVC
Copy link
Contributor

/azp run Big Models,Linux Android Emulator QNN CI Pipeline,Linux CPU CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,Linux OpenVINO CI Pipeline,Linux QNN CI Pipeline,MacOS CI Pipeline

@HectorSVC
Copy link
Contributor

/azp run Windows ARM64 QNN CI Pipeline,Windows CPU CI Pipeline,Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline,Windows x64 QNN CI Pipeline,onnxruntime-binary-size-checks-ci-pipeline,orttraining-linux-ci-pipeline,orttraining-linux-gpu-ci-pipeline,orttraining-ortmodule-distributed

@HectorSVC
Copy link
Contributor

/azp run ONNX Runtime Web CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows GPU CUDA CI Pipeline,Windows GPU DML CI Pipeline,Windows GPU Doc Gen CI Pipeline

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

Copy link

Azure Pipelines successfully started running 9 pipeline(s).

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@fs-eire
Copy link
Contributor

fs-eire commented Jan 24, 2025

Sorry for the late review.

I think we should better first define the JavaScript API for QNN here, then in this PR parse/read them accordingly.

@fs-eire
Copy link
Contributor

fs-eire commented Jan 24, 2025

Sorry for the late review.

I think we should better first define the JavaScript API for QNN here, then in this PR parse/read them accordingly.

I created #23486. Please help take a look

if (qnn_options.find("backend_path") == qnn_options.end()) {
qnn_options["backend_path"] = "QnnHtp.dll";
}
if (qnn_options.find("enable_htp_fp16_precision") == qnn_options.end()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

QNN EP already set enable_htp_fp16_precision to 1 by default, so you can skip it here.

@HectorSVC HectorSVC added the ep:QNN issues related to QNN exeution provider label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:QNN issues related to QNN exeution provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants