Skip to content

webgpu: support int64 for Unsqueeze and Expand operators - #27478

Merged
guschmue merged 1 commit into
microsoft:mainfrom
xhcao:support-Unsqueeze-Expand-int64
Feb 27, 2026
Merged

webgpu: support int64 for Unsqueeze and Expand operators#27478
guschmue merged 1 commit into
microsoft:mainfrom
xhcao:support-Unsqueeze-Expand-int64

Conversation

@xhcao

@xhcao xhcao commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

Description

Motivation and Context

@xhcao

xhcao commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

After supporting int64 for Unsqueeze and Expand operators, below models could use graph capture feature, and could get performance improvement.

<style> </style>
Models Performance improvement (%)
florence-2-base-decoder-with-past-fp16 8%
jina-embeddings-v2-base-code 7%
jina-embeddings-v2-base-code-fp16 7%
jina-reranker-v1-turbo-en 6%
jina-reranker-v1-turbo-en-fp16 7%
sdunet-v1.5-demo-layernorm 20%
squeezebert-uncased 10%

@jchen10

@guschmue guschmue added the ep:WebGPU ort-web webgpu provider label Feb 27, 2026
@guschmue

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).

@guschmue
guschmue enabled auto-merge (squash) February 27, 2026 18:55
@guschmue
guschmue merged commit a16cf05 into microsoft:main Feb 27, 2026
87 of 89 checks passed
hariharans29 pushed a commit that referenced this pull request Jul 23, 2026
### Description
This updates WebGPU `Reshape` to follow the existing `enable_int64`
factory-registration pattern (used by `Unsqueeze`/`Expand`/etc.) instead
of static macro registration, and adds explicit int64 WebGPU test
coverage for `Reshape`.



### Motivation and Context
PR
[#27478](#27478)
added int64 support for the Expand and Unsqueeze (Squeeze) operators in
the WebGPU EP. However, the WebNN EP maps a number of those
shape-manipulation operators — including Squeeze/Unsqueeze — onto
Reshape (WebNN spec doesn't support Squeeze/Unsqueeze). As a result,
when a model uses int64 data through these WebNN-mapped ops, execution
falls back because Reshape itself does not yet accept int64 tensors,
undermining the int64 coverage that #27478 was intended to enable.

Fix #29756

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:WebGPU ort-web webgpu provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants