!24723 fix read workspace error

Merge pull request !24723 from jjfeing/fix_no_workspace
This commit is contained in:
i-robot 2021-10-12 07:21:51 +00:00 committed by Gitee
commit 0be191ba7d
1 changed files with 6 additions and 4 deletions

View File

@ -606,14 +606,16 @@ bool AscendKernelCompileManager::AscendSingleOpCompile(const std::vector<AnfNode
std::vector<size_t> in_size_list;
std::vector<size_t> out_size_list;
(void)TbeKernelBuild::GetIOSize(kernel_json, &in_size_list, &out_size_list, node);
if (!is_tune_flag_ && op_debug_level_ != "1" &&
build_manager_->SearchInCache(json_name, in_size_list, out_size_list, node.get())) {
continue;
}
// step1: if same node has been dispitch, no need to compile
if (single_processed_kernels_.find(json_name) != single_processed_kernels_.end()) {
build_manager_->SaveSameOpInfo(node, json_name, in_size_list, out_size_list);
continue;
}
// step2: if node has in the cache, load the cache.
if (!is_tune_flag_ && op_debug_level_ != "1" &&
build_manager_->SearchInCache(json_name, in_size_list, out_size_list, node.get())) {
continue;
}
(void)single_processed_kernels_.insert(json_name);
nlohmann::json build_json;