Skip to content

[QNN EP] Add Support for Reciprocal Op in QNN EP #25035

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

quic-ashwshan
Copy link
Contributor

  • Implemented ReciprocalOpBuilder to support ONNX Reciprocal Op in QNN EP.
  • Decomposed Reciprocal into a Div Op.
  • Added unit tests to run Reciprocal Op on HTP

Description

Adds support for the ONNX Reciprocal operator in QNN EP via Div decomposition.

Motivation and Context

Enables execution of models using Reciprocal on QNN backend, improving Op support.

- Implemented ReciprocalOpBuilder to support ONNX Reciprocal Op in QNN
  EP.
- Decomposed Reciprocal into a Div Op.
- Added unit tests to run Reciprocal Op on HTP
@HectorSVC
Copy link
Contributor

/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

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@HectorSVC HectorSVC added the ep:QNN issues related to QNN exeution provider label Jun 11, 2025
- Implemented ReciprocalOpBuilder to support ONNX Reciprocal Op in QNN
  EP.
- Decomposed Reciprocal into a Div Op.
- Added unit tests to run Reciprocal Op on HTP
- Added QDQ Selector for Reciprocal Op
- Implemented ReciprocalOpBuilder to support ONNX Reciprocal Op in QNN
  EP.
- Decomposed Reciprocal into a Div Op.
- Added unit tests to run Reciprocal Op on HTP
- Added QDQ Selector for Reciprocal Op
@quic-ashwshan quic-ashwshan requested a review from HectorSVC June 17, 2025 17:40
@HectorSVC
Copy link
Contributor

/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

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

HectorSVC
HectorSVC previously approved these changes Jun 17, 2025
Copy link
Contributor

@HectorSVC HectorSVC left a comment

Choose a reason for hiding this comment

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

:shipit:

@quic-ashwshan
Copy link
Contributor Author

There is one CPU test of Recirpocal which is failing now since we have added support in EP now. Will fix that and have another patchset. Function - Reciprocal_double is failing as we do not map DOUBLE to float in QNN.

- Add check for input type to be float for CPU Backend
@quic-ashwshan
Copy link
Contributor Author

There is one CPU test of Recirpocal which is failing now since we have added support in EP now. Will fix that and have another patchset. Function - Reciprocal_double is failing as we do not map DOUBLE to float in QNN.

Resolved.

@HectorSVC
Copy link
Contributor

/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

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@HectorSVC
Copy link
Contributor

/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

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@HectorSVC
Copy link
Contributor

/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

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

Copy link
Contributor

@HectorSVC HectorSVC left a comment

Choose a reason for hiding this comment

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

:shipit:

@HectorSVC HectorSVC merged commit 0385779 into microsoft:main Jun 19, 2025
83 checks passed
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.

2 participants