Skip to content

[webgpu] Simplify the signature of CanApplyFlashAttention - #26926

Merged
qjia7 merged 1 commit into
mainfrom
fa-no-present
Jan 8, 2026
Merged

[webgpu] Simplify the signature of CanApplyFlashAttention#26926
qjia7 merged 1 commit into
mainfrom
fa-no-present

Conversation

@qjia7

@qjia7 qjia7 commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

This pull request simplifies the logic for handling present key/value tensors in the WebGPU Flash Attention implementation. The main change is that the responsibility for creating internal present key/value tensors is moved from the caller to the ApplyFlashAttention function itself. This reduces code duplication and makes the API easier to use. Additionally, the CanApplyFlashAttention function is simplified to remove unnecessary checks for present key/value tensors.

@guschmue guschmue added the ep:WebGPU ort-web webgpu provider label Jan 7, 2026
@qjia7
qjia7 marked this pull request as ready for review January 8, 2026 01:43
@qjia7
qjia7 merged commit 56c984f into main Jan 8, 2026
91 checks passed
@qjia7
qjia7 deleted the fa-no-present branch January 8, 2026 01:44
alex-spacemit pushed a commit to spacemit-com/onnxruntime that referenced this pull request Jan 20, 2026
…26926)

This pull request simplifies the logic for handling present key/value
tensors in the WebGPU Flash Attention implementation. The main change is
that the responsibility for creating internal present key/value tensors
is moved from the caller to the `ApplyFlashAttention` function itself.
This reduces code duplication and makes the API easier to use.
Additionally, the `CanApplyFlashAttention` function is simplified to
remove unnecessary checks for present key/value tensors.
alex-spacemit pushed a commit to spacemit-com/onnxruntime that referenced this pull request Jan 27, 2026
…26926)

This pull request simplifies the logic for handling present key/value
tensors in the WebGPU Flash Attention implementation. The main change is
that the responsibility for creating internal present key/value tensors
is moved from the caller to the `ApplyFlashAttention` function itself.
This reduces code duplication and makes the API easier to use.
Additionally, the `CanApplyFlashAttention` function is simplified to
remove unnecessary checks for present key/value tensors.
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.

2 participants