Skip to content

Prevent cross-EP Cast fusion in RemoveDuplicateCastTransformer#27363

Open
fs-eire wants to merge 1 commit intomainfrom
fs-eire/fix-cast-fuse
Open

Prevent cross-EP Cast fusion in RemoveDuplicateCastTransformer#27363
fs-eire wants to merge 1 commit intomainfrom
fs-eire/fix-cast-fuse

Conversation

@fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Feb 16, 2026

Description

Fixes an incorrect Cast deduplication across execution provider boundaries.
Today, Cast(int64->float, CPU) -> Cast(float->float16, WebGPU) can be fused into Cast(int64->float16, WebGPU), which is invalid for WebGPU and can fail kernel lookup.

This change adds an EP check so Cast fusion only happens when both nodes are on the same EP, and adds a regression test for this scenario.

Motivation and Context

Fixes #27291

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.

[WebGPU] Failed to find kernel for Cast(13) for WebGpuExecutionProvider

1 participant