-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[QNN EP] Fuse Gelu pattern into a QNN Gelu Node #26417
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
[QNN EP] Fuse Gelu pattern into a QNN Gelu Node #26417
Conversation
|
@chilo-ms, @devang-ml Could you please help to trigger CI job on this PR. Thanks, |
onnxruntime/core/providers/qnn/builder/qnn_node_group/gelu_fusion.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/gelu_fusion.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/gelu_fusion.h
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/gelu_fusion.h
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/qnn_node_group.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/gelu_fusion.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/gelu_fusion.cc
Outdated
Show resolved
Hide resolved
|
/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 4 pipeline(s). |
onnxruntime/core/optimizer/qdq_transformer/selectors_actions/shared/utils.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/gelu_fusion.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/qnn_node_group.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/qnn/builder/qnn_node_group/gelu_fusion.h
Outdated
Show resolved
Hide resolved
|
Hi @adrianlizarraga , |
|
/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 4 pipeline(s). |
|
Hi @quic-tirupath, you may have to sync with the latest main branch to get CIs to pass. |
- ONNX models exported with older Opset version contains Gelu operator decomposed into multiple operators (Div, Erf, Add, Mul). - QNN doesn't support Erf operator but supports Gelu operator - Since QNN doesn't support Erf operator, the graphs contain Gelu pattern partition between QNN and CPU EPs and degrading the inference time. - Identify and fuse the Gelu pattern into a QNN Gelu node improves the inference time.
e881532 to
5812d30
Compare
@adrianlizarraga |
@adrianlizarraga |
|
/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 4 pipeline(s). |
Description
Motivation and Context