From d7ba9814cffa9615b1c525c05f094527ef28f4d5 Mon Sep 17 00:00:00 2001 From: Yufeng Li Date: Wed, 26 Apr 2023 14:03:36 -0700 Subject: [PATCH] [prefast:Warning]: C26409 ('PackedAttention::TryGettingFusedRunner') (#15663) ### Description ### Motivation and Context --- onnxruntime/contrib_ops/cuda/bert/packed_attention.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/contrib_ops/cuda/bert/packed_attention.cc b/onnxruntime/contrib_ops/cuda/bert/packed_attention.cc index da768f7775..54d69fd8f1 100644 --- a/onnxruntime/contrib_ops/cuda/bert/packed_attention.cc +++ b/onnxruntime/contrib_ops/cuda/bert/packed_attention.cc @@ -238,8 +238,8 @@ MHARunner* PackedAttention::TryGettingFusedRunner(const PackedAttentionParame // Assuming that num_heads and head_size do not change. if (nullptr == fused_fp16_runner_.get()) { - fused_fp16_runner_.reset(new FusedMHARunnerFP16v2(num_heads_, parameters.head_size, sm, false /* causal_mask*/, - enable_trt_flash_attention_, parameters.scale)); + fused_fp16_runner_ = FusedMHARunnerFP16v2::Create(num_heads_, parameters.head_size, sm, false /* causal_mask*/, + enable_trt_flash_attention_, parameters.scale); } // In case some kernel not loaded due to shared memory limit, we need to double check here.