Skip to content

Commit

Permalink
[JSEP/WebGPU] Add a fatal error message for unsupported GQA do_rotary…
Browse files Browse the repository at this point in the history
… attribute. (#23287)

### Description
<!-- Describe your changes. -->

Added a fatal error message for unsupported GroupQuerryAttention
do_rotary attribute.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
#22987
Help user understand that this attribute is not supported.
  • Loading branch information
satyajandhyala authored Jan 9, 2025
1 parent 3b1a900 commit d0c7438
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/web/lib/wasm/jsep/webgpu/ops/group-query-attention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const validateInputs = (
inputs: readonly TensorView[],
attributes: GroupQueryAttentionAttributes,
): AttentionParameters => {
if (attributes.doRotary) {
throw new Error('GroupQuerryAttention do_rotary attribute is not supported');
}
if (attributes.doRotary && inputs.length <= 7) {
throw new Error('cos_cache and sin_cache inputs are required if do_rotary is specified');
}
Expand Down

0 comments on commit d0c7438

Please sign in to comment.