Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if the size is zero in addition to other checks for packedQKV #23266

Closed
wants to merge 4 commits into from

Conversation

satyajandhyala
Copy link
Contributor

Description

In the case of PackedQKV the code should not check the dims of the input 'key' because it is a null tensor.

Motivation and Context

#22987

@@ -85,7 +85,7 @@
let kvSequenceLength = sequenceLength;

let pastSequenceLength = 0;
const packedQKV = !key || key.dims.length === 0;
const packedQKV = !key || key === null || key.dims.length === 0;

Check warning

Code scanning / CodeQL

Comparison between inconvertible types Warning

Variable 'key' cannot be of type null, but it is compared to
an expression
of type null.
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.

1 participant