From e9d9101ba217b69625e78c8be9549b07ecb81c26 Mon Sep 17 00:00:00 2001 From: WilliamLian Date: Fri, 11 Sep 2020 17:40:49 +0800 Subject: [PATCH] fix bug of kernel select index mathed error --- .../ccsrc/runtime/device/ascend/kernel_select_ascend.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mindspore/ccsrc/runtime/device/ascend/kernel_select_ascend.cc b/mindspore/ccsrc/runtime/device/ascend/kernel_select_ascend.cc index b7fc48f1f0..de25f5e0d1 100644 --- a/mindspore/ccsrc/runtime/device/ascend/kernel_select_ascend.cc +++ b/mindspore/ccsrc/runtime/device/ascend/kernel_select_ascend.cc @@ -147,9 +147,6 @@ void UpdateCurMatchCounts(const kernel::KernelBuildInfo &kernel_build_info, cons if (kernel_build_info.GetInputFormat(input_index) == pri_match_format) { (*cur_kernelinfo_match_counts)[MATCH_SPECIAL_FORMAT_COUNT] += base_score; } - if (kernel_build_info.GetOutputFormat(input_index) == pri_match_format) { - (*cur_kernelinfo_match_counts)[MATCH_SPECIAL_FORMAT_COUNT] += base_score; - } if (kernel_build_info.GetInputFormat(input_index) == kOpFormat_DEFAULT) { (*cur_kernelinfo_match_counts)[MATCH_DEFAULT_FORMAT_COUNT] += base_score; } @@ -161,6 +158,9 @@ void UpdateCurMatchCounts(const kernel::KernelBuildInfo &kernel_build_info, cons AnfAlgo::GetOutputInferDataType(kernel_node, output_index)) { (*cur_kernelinfo_match_counts)[MATCH_OUTPUT_DTYPE_COUNT] += 1; } + if (kernel_build_info.GetOutputFormat(output_index) == pri_match_format) { + (*cur_kernelinfo_match_counts)[MATCH_SPECIAL_FORMAT_COUNT] += 1; + } } }