Skip to content

WebGPU EP: Add int64 support for Tile operator#29875

Open
huningxin wants to merge 3 commits into
microsoft:mainfrom
huningxin:copilot/add-int64-support-tile-op
Open

WebGPU EP: Add int64 support for Tile operator#29875
huningxin wants to merge 3 commits into
microsoft:mainfrom
huningxin:copilot/add-int64-support-tile-op

Conversation

@huningxin

@huningxin huningxin commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Description

Adds int64 data type support to the Tile operator in the WebGPU execution provider. The op is used by yolo26n-pose and other models that tile int64 tensors.

Motivation and Context

The WebGPU Tile kernel was registered with WebGpuSupportedNumberTypes() (float/fp16/int32/uint32 only), causing int64 tensors to fall back to CPU. Beyond the missing type constraint, the WGSL getter for Int64 variables returns only the low 32 bits (i32(buf[offset].x)), and the default setter sign-extends from that i32 — silently corrupting any value with non-zero high bits. Since Tile is pure data-movement with no arithmetic on element values, int64 is safe to support by treating each element as an opaque vec2<u32> copy.

Copilot AI added 3 commits July 24, 2026 23:48
- Replace ONNX_OPERATOR macro registrations with CreateTileVersionedKernelInfo/
  CreateTileKernelInfo factory functions gated by enable_int64 (mirrors Reshape,
  Expand, Sub, etc.)
- Update TileProgram to carry an is_int64_ flag; when true, GenerateShaderCode
  copies the raw vec2<u32> storage via IndicesToOffset + SetByOffset(use_storage_type)
  to preserve all 64 bits instead of sign-extending from i32
- Register Tile kernels via RegisterKernels() with the enable_int64 flag
- Include tile.h in webgpu_execution_provider.cc; remove old BuildKernelCreateInfo
  entries for Tile from the static table
- Add TileInt64TypeWebGpu test using values with non-zero high 32 bits
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

2 participants