one prefast warning fix (#14912)

This commit is contained in:
Zhang Lei 2023-03-20 10:38:27 -07:00 committed by GitHub
parent bdd7bd084c
commit 226a691e05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,7 +158,7 @@ QOrderedLongformerAttention::ComputeInternal(OpKernelContext* context) const {
int k = hidden_size;
size_t qkv_count = (size_t)m * (size_t)n;
size_t qkv_size = batch_size * sequence_length * 3 * hidden_size * element_size;
size_t qkv_size = (size_t)batch_size * sequence_length * 3 * hidden_size * element_size;
// Buffer for GEMM outputs of q, k, v, global_q, global_k and global_v
// TODO(tianleiwu): compact global_q only need batch_size * window * hidden_size * element_size buffer size.
size_t qkv_3 = qkv_size + qkv_size + 2 * qkv_count * sizeof(int8_t);