Skip to content

[QNN-EP] Support pad op pre-opset11 - #26248

Merged
yuslepukhin merged 2 commits into
microsoft:mainfrom
CodeLinaro:dev/mattsinc/enable-pad-pre-opset11
Jan 12, 2026
Merged

[QNN-EP] Support pad op pre-opset11#26248
yuslepukhin merged 2 commits into
microsoft:mainfrom
CodeLinaro:dev/mattsinc/enable-pad-pre-opset11

Conversation

@qti-mattsinc

Copy link
Copy Markdown
Contributor

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.

@edgchen1 edgchen1 added the ep:QNN issues related to QNN exeution provider label Dec 12, 2025
Comment thread onnxruntime/test/providers/cpu/tensor/pad_test.cc Outdated
Comment thread onnxruntime/test/providers/cpu/tensor/pad_test.cc Outdated
Comment thread onnxruntime/test/providers/cpu/tensor/pad_test.cc Outdated
Comment thread onnxruntime/test/providers/cpu/tensor/pad_test.cc

@yuslepukhin yuslepukhin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🕐

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 PadOpBuilder to 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.

Comment thread onnxruntime/core/providers/qnn/builder/opbuilder/pad_op_builder.cc Outdated
Comment thread onnxruntime/core/providers/qnn/builder/opbuilder/pad_op_builder.cc Outdated
Comment thread onnxruntime/test/providers/qnn/pad_op_test.cpp Outdated
Comment thread onnxruntime/core/providers/qnn/builder/opbuilder/pad_op_builder.cc Outdated
@yuslepukhin

Copy link
Copy Markdown
Contributor

/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

@yuslepukhin

Copy link
Copy Markdown
Contributor

/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

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@yuslepukhin yuslepukhin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

@yuslepukhin
yuslepukhin enabled auto-merge (squash) January 12, 2026 19:46
@yuslepukhin
yuslepukhin merged commit 15efe1c into microsoft:main Jan 12, 2026
100 of 101 checks passed
@yuslepukhin

Copy link
Copy Markdown
Contributor

/azp run Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline

alex-spacemit pushed a commit to spacemit-com/onnxruntime that referenced this pull request Jan 20, 2026
### 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.
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.

4 participants