[QNN-EP] Add negtive padding value support.#25928
Conversation
Signed-off-by: Mu-Chein Hsu <quic_muchhsu@quicinc.com>
|
/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows x64 QNN CI Pipeline |
|
Azure Pipelines successfully started running 5 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for negative padding values in the QNN execution provider by implementing a two-step lowering approach: first applying positive padding operations, then using stride_slice operations to handle negative padding when present.
- Implements negative padding support by decomposing into pad + stride_slice operations
- Adds validation to reject reflect mode with negative padding values
- Extends test coverage for negative and mixed padding scenarios across CPU and HTP backends
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| onnxruntime/core/providers/qnn/builder/opbuilder/pad_op_builder.cc | Core implementation adding negative padding logic with pad+slice decomposition |
| onnxruntime/test/providers/qnn/pad_op_test.cpp | Comprehensive test cases covering negative and mixed padding scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Mu-Chein Hsu <quic_muchhsu@quicinc.com>
|
@HectorSVC I have fixed this PR according to copilot review. Please start CI. Thanks! |
|
/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows x64 QNN CI Pipeline |
|
Azure Pipelines successfully started running 5 pipeline(s). |
Description
Add negative padding value support for QNN EP by lower padding to pad + stride_slice(if negative padding value exists.)
Motivation and Context
ONNX and QNN complier in QAIRT both supports negative padding value by lowering to slice/resize_crop. Adding this change to align EP with QNN and ONNX