From 226a691e052a53cd3b7aa52cdd9f061469f0e13b Mon Sep 17 00:00:00 2001 From: Zhang Lei Date: Mon, 20 Mar 2023 10:38:27 -0700 Subject: [PATCH] one prefast warning fix (#14912) --- .../quantization/qordered_ops/qordered_longformer_attention.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/contrib_ops/cuda/quantization/qordered_ops/qordered_longformer_attention.cc b/onnxruntime/contrib_ops/cuda/quantization/qordered_ops/qordered_longformer_attention.cc index da5b8b26bf..768269452b 100644 --- a/onnxruntime/contrib_ops/cuda/quantization/qordered_ops/qordered_longformer_attention.cc +++ b/onnxruntime/contrib_ops/cuda/quantization/qordered_ops/qordered_longformer_attention.cc @@ -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);