-
Notifications
You must be signed in to change notification settings - Fork 99
docs: add ONNXRuntime QNN Execution Provider zh docs #1203
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
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.
💡 To request another review, post a new comment with "/windsurf-review".
| </NewCodeBlock> | ||
|
|
||
| :::tip | ||
| 请提根据实际 QAIRT SDK 路径修改 `backend_path` 路径 |
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.
There's a typo in this tip section. '请提根据实际 QAIRT SDK 路径修改' should be '请根据实际 QAIRT SDK 路径修改'.
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.
done
|
/windsurf-review |
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.
💡 To request another review, post a new comment with "/windsurf-review".
| <NewCodeBlock tip="Device" type="device"> | ||
|
|
||
| ```bash | ||
| pip3 install -r requirement.txt |
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.
There's a typo in the pip install command for requirements. The correct filename should be 'requirements.txt' (with an 's').
| pip3 install -r requirement.txt | |
| pip3 install -r requirements.txt |
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.
done
|
/windsurf-review |
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.
💡 To request another review, post a new comment with "/windsurf-review".
|
|
||
| ```bash | ||
| pip3 install -r requirements.txt | ||
| ./build.sh --use_qnn --qnn_home [QNN_SDK_PATH] --build_shared_lib --build_wheel --config Release --parallel --skip_tests --build_dir build/Linux |
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 build.sh command contains --qnn_home [QNN_SDK_PATH] but doesn't explain what value should replace [QNN_SDK_PATH]. Consider adding a note explaining this should be replaced with the path to the QAIRT SDK installation directory.
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.
done
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.
add tip. done
|
|
||
| # Create an ONNX Runtime session. | ||
| # TODO: Provide the path to your ONNX model | ||
| session = onnxruntime.InferenceSession("job_jpy6ye005_optimized_onnx/model.onnx", |
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 example code uses a hardcoded model path job_jpy6ye005_optimized_onnx/model.onnx which won't match what users download. Consider replacing this with a more generic path and adding a comment to remind users to update it with their actual downloaded model path.
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.
done
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.
add tip. done
| session = onnxruntime.InferenceSession("job_jpy6ye005_optimized_onnx/model.onnx", | ||
| sess_options=options, | ||
| providers=["QNNExecutionProvider"], | ||
| provider_options=[{"backend_path": "libQnnHtp.so"}]) # Provide path to Htp dll in QNN SDK |
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 backend_path parameter is set to just "libQnnHtp.so" without a full path. This will only work if the library is in the system's library search path. Consider updating this to use a full path like "$QNN_SDK_ROOT/lib/aarch64-oe-linux-gcc11.2/libQnnHtp.so" or adding a note explaining how to specify the correct full path.
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.
add tip, done
|
/windsurf-review |
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.
Looks good to me 🤙
💡 To request another review, post a new comment with "/windsurf-review".
Signed-off-by: ZIFENG278 <[email protected]>
docs: add ONNXRuntime QNN Execution Provider zh docs