From cdc36e521ee5ea34ba7b9f4182dd7d269088f8e3 Mon Sep 17 00:00:00 2001 From: Your Date: Mon, 11 Mar 2024 23:13:45 +0000 Subject: [PATCH] review comments --- onnxruntime/core/providers/cuda/cuda_execution_provider.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/cuda/cuda_execution_provider.cc b/onnxruntime/core/providers/cuda/cuda_execution_provider.cc index c38adcc82b24f..05d9f3b5a1e8f 100644 --- a/onnxruntime/core/providers/cuda/cuda_execution_provider.cc +++ b/onnxruntime/core/providers/cuda/cuda_execution_provider.cc @@ -242,7 +242,8 @@ Status CUDAExecutionProvider::PerThreadContext::ReplayGraph(CudaGraphAnnotation_ void CUDAExecutionProvider::PerThreadContext::IncrementRegularRunCountBeforeGraphCapture( CudaGraphAnnotation_t cuda_graph_annotation_id) { if (graph_id_to_run_count_.find(cuda_graph_annotation_id) == graph_id_to_run_count_.end()) { - graph_id_to_run_count_[cuda_graph_annotation_id] = 0; + graph_id_to_run_count_[cuda_graph_annotation_id] = 1; + return; } graph_id_to_run_count_[cuda_graph_annotation_id]++; }