From bac7770584b674a09f79ec991284080a84d0d632 Mon Sep 17 00:00:00 2001 From: jjfeing Date: Thu, 4 Feb 2021 21:44:50 +0800 Subject: [PATCH] fix mul compile failed --- .../ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc | 5 +++++ .../kernel_compiler/tbe/tbe_kernel_parallel_build.cc | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc index cb491c04bd3..1c52b3eade3 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc @@ -94,6 +94,7 @@ constexpr auto kJListArgs = "list_args"; constexpr auto kJSocVersion = "socVersion"; constexpr auto kSOC_VERSION = "SOC_VERSION"; constexpr auto kJIsDynamicShape = "is_dynamic_shape"; +constexpr auto kJDynamicIndex = "dynamic_index"; bool IsNeedChangeDefaultFormat(const CNodePtr &cnode) { MS_EXCEPTION_IF_NULL(cnode); @@ -137,6 +138,10 @@ bool TbeKernelJsonCreator::GenTbeSingleKernelJson(const std::shared_ptr()(json_str); auto context_ptr = MsContext::GetInstance(); diff --git a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_parallel_build.cc b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_parallel_build.cc index 7bf9e0ee9d4..23a4c2019d5 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_parallel_build.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_parallel_build.cc @@ -56,13 +56,11 @@ bool TbeOpParallelBuild(const std::vector &anf_nodes) { (void)TbeKernelBuild::GetIOSize(kernel_json, &input_size_list, &output_size_list, anf_node); // search cache const std::string &json_name = creator.json_name(); - auto IsDynamicShape = tbe::TbeDynamicShapeUtil::GetDynamicShapeAttr(anf_node); - if (build_manger->SearchInCache(json_name, processor, input_size_list, output_size_list, anf_node.get()) && - !IsDynamicShape) { + if (build_manger->SearchInCache(json_name, processor, input_size_list, output_size_list, anf_node.get())) { continue; } // same op not need build, but need wait build finish to set kernel mode - if (processed_kernel.find(json_name) != processed_kernel.end() && !IsDynamicShape) { + if (processed_kernel.find(json_name) != processed_kernel.end()) { build_manger->SaveSameOpInfo(anf_node, json_name, input_size_list, output_size_list); continue; }