Skip to content

Commit

Permalink
Add a fatal error message for unsupported GQA do_rotary attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajandhyala committed Jan 8, 2025
1 parent 4b0cee3 commit 73c563b
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 73c563b

Please sign in to comment.