Skip to content

Add SimpLayerNorm, GQA to supported_ops #625

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

Open
wants to merge 1 commit into
base: ovep-develop
Choose a base branch
from

Conversation

wine99
Copy link

@wine99 wine99 commented Mar 21, 2025

Description

Added GroupQueryAttention and SimplifiedLayerNormalization to supported ops.

Motivation and Context

With these two PR openvinotoolkit/openvino#28963 openvinotoolkit/openvino#28163 merged into OpenVINO, ONNX models generated by onnxruntime-genai containing these two ops will work.

Example models: Phi3 and Llama3 generated by the following command:

python -m onnxruntime_genai.models.builder -m meta-llama/Llama-3.1-8B-Instruct -o E:\download\onnx\llama3.1-8B-instruct-onnx -p int4 -e cpu -i E:\download\huggingface\llama3.1-8B-instruct

@wine99
Copy link
Author

wine99 commented Mar 25, 2025

@ankitm3k Please review

@ankitm3k
Copy link

@wine99 Can you please confirm the changes are functional with both benchmark_app & onnxruntime_perf_test app i.e. the model is fully supported without causing any subgraph partitions.

May I know these Ops are enable individually for which OV devices viz. CPU, GPU , NPU or NPUW? Kindly also state the OV toolkit version since which this support was introduced of course you have mentioned 2025.1 here.

Copy link

@ankitm3k ankitm3k left a comment

Choose a reason for hiding this comment

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

.

@sfatimar sfatimar requested a review from MayureshV1 March 26, 2025 06:20
@sfatimar
Copy link

@MayureshV1 can you please take a look at this. With this merge, Phi Silica model will fail.

@wine99
Copy link
Author

wine99 commented Mar 26, 2025

@ankitm3k

Can you please confirm the changes are functional with both benchmark_app & onnxruntime_perf_test app i.e. the model is fully supported without causing any subgraph partitions.

The models mentioned in the comments (phi3 and llama3) are fully supported. The whole graph is run on OV EP (CPU and iGPU).

May I know these Ops are enable individually for which OV devices viz. CPU, GPU , NPU or NPUW? Kindly also state the OV toolkit version since which this support was introduced of course you have mentioned 2025.1 here.

The ops are enabled for CPU and iGPU. Support for NPU/NPUW is WIP. The current OV version of the master branch is 2025.1.0. We built the master branch and the models are fully supported with the changes in this PR.

@sfatimar
Copy link

@wine99 @ankitm3k we can only support GQA for GPU, For CPU, NPU we must fallback to MLAS to support Phi Silica Implementation

Copy link

@sfatimar sfatimar left a comment

Choose a reason for hiding this comment

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

@wine99 @ankitm3k we can only support GQA for GPU, For CPU, NPU we must fallback to MLAS to support Phi Silica Implementation

@sgbihu
Copy link

sgbihu commented Mar 27, 2025

@wine99 @ankitm3k we can only support GQA for GPU, For CPU, NPU we must fallback to MLAS to support Phi Silica Implementation

I think we have NPU GQA implementation, you can try Phi Silica when we merge it.

@MayureshV1
Copy link

@MayureshV1 can you please take a look at this. With this merge, Phi Silica model will fail.

@sfatimar , I think you are right. Once we merge this PR ORT will not split subgraphs between MLAS and OV NPU. Entire model would try to execute on NPU. NPU compilation will fail due to lack of GQA support and entire model would run on OV CPU.

@ankitm3k , @preetha-intel Do you have a suggestion ton how we can test graph split between OV NPU and OV CPU (GQA) and later run entire graph on OV NPU when GQA is supported.
@sfatimar , We would likely need to have this merged to a different branch for intermediate testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants