Skip to content

[WebNN] Fix bug in RotaryEmbedding#24516

Merged
fdwr merged 2 commits intomicrosoft:mainfrom
Honry:fix-rotaryEmbedding
Apr 24, 2025
Merged

[WebNN] Fix bug in RotaryEmbedding#24516
fdwr merged 2 commits intomicrosoft:mainfrom
Honry:fix-rotaryEmbedding

Conversation

@Honry
Copy link
Contributor

@Honry Honry commented Apr 23, 2025

This PR fixes incorrect input/output shape, according to DML EP's implementation, we should ensure the input shape to be [batch_size, sequence_length, num_heads, head_size].

The input shape should be reshaped or transposed to
 [batch_size, sequence_length, num_heads, head_size]
@Honry
Copy link
Contributor Author

Honry commented Apr 23, 2025

@fdwr, @guschmue, PTAL, thanks!

@guschmue guschmue added the ep:WebNN WebNN execution provider label Apr 23, 2025
Copy link
Contributor

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

4 comments, else LGTM.

@Honry
Copy link
Contributor Author

Honry commented Apr 24, 2025

@fdwr, thanks for your comments!

Fixed and PTAL again, thanks!

Copy link
Contributor

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

👍

@fdwr
Copy link
Contributor

fdwr commented Apr 24, 2025

/azp run ONNX Runtime Web CI Pipeline,Windows GPU CI Pipeline,Linux Android Emulator QNN CI Pipeline,Windows GPU WebGPU CI Pipeline,Windows OpenVINO CI Pipeline

@fdwr
Copy link
Contributor

fdwr commented Apr 24, 2025

/azp run Linux CPU CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,Linux OpenVINO CI Pipeline,Linux QNN CI Pipeline,MacOS CI Pipeline,Windows ARM64 QNN CI Pipeline,Windows CPU CI Pipeline

@fdwr
Copy link
Contributor

fdwr commented Apr 24, 2025

/azp run Windows GPU CUDA CI Pipeline,Windows GPU DML CI Pipeline,Windows GPU Doc Gen CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI

@fdwr
Copy link
Contributor

fdwr commented Apr 24, 2025

/azp run Windows GPU TensorRT CI Pipeline,onnxruntime-binary-size-checks-ci-pipeline,orttraining-linux-ci-pipeline,orttraining-linux-gpu-ci-pipeline,orttraining-ortmodule-distributed,Windows x64 QNN CI Pipeline,Big Models

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

1 similar comment
@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@fdwr
Copy link
Contributor

fdwr commented Apr 24, 2025

Remaining 5 failures are unrelated and infrastructure related.

ERROR: failed to authorize: failed to fetch anonymous token: unexpected status from GET request

@fdwr fdwr merged commit 1de5af8 into microsoft:main Apr 24, 2025
71 of 76 checks passed
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request May 12, 2025
This PR fixes incorrect input/output shape, according to [DML EP's
implementation](https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/DmlOperatorRotaryEmbedding.cpp#L142C47-L142C94),
we should ensure the input shape to be [batch_size, sequence_length,
num_heads, head_size].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:WebNN WebNN execution provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants