[QNN-EP] Support pad op pre-opset11 - #26248
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for pre-opset11 Pad operators in the QNN execution provider and introduces comprehensive GPU backend tests. Pre-opset11 Pad operators use attributes for pads and value parameters instead of inputs, which required updates to the op builder validation and processing logic.
Key Changes:
- Modified
PadOpBuilderto handle both attribute-based (opset < 11) and input-based (opset >= 11) pad specifications - Added test infrastructure to support opset parameter in test cases
- Added GPU backend test coverage for various Pad configurations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
onnxruntime/core/providers/qnn/builder/opbuilder/pad_op_builder.cc |
Updated validation and processing logic to handle pre-opset11 Pad operators by reading pads and value from attributes instead of inputs |
onnxruntime/test/providers/qnn/pad_op_test.cpp |
Added opset parameter support to test builders and added GPU backend tests along with Pad2dOpset7 test cases for CPU and GPU |
onnxruntime/test/providers/cpu/tensor/pad_test.cc |
Added QNN execution provider skip conditions for tests with known failures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/asp run Windows GPU CUDA CI Pipeline, Windows GPU DML CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows OpenVINO CI Pipeline, Windows x64 QNN CI Pipeline |
|
/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline |
|
Azure Pipelines successfully started running 4 pipeline(s). |
|
/azp run Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline |
### Description - Support pre-opset11 `Pad` in the QNN op builder. - Add GPU backend tests for `Pad`. ### Motivation and Context - Enables `Pad` translation in models using older opsets.
Description
Padin the QNN op builder.Pad.Motivation and Context
Padtranslation in models using older opsets.