!69058 disable backend compile cache in msrun mode
Merge pull request !69058 from xiaoyao/mobile
This commit is contained in:
commit
efc7063354
|
@ -319,15 +319,15 @@ std::string CompileCacheManager::GetCachedDataQueueName(const std::string &datas
|
|||
return queue_name;
|
||||
}
|
||||
data_queue_num_++;
|
||||
auto &config_mng = ConfigManager::GetInstance();
|
||||
if (config_mng.dataset_phase().empty()) {
|
||||
config_mng.set_dataset_phase(dataset_phase);
|
||||
}
|
||||
// if queue name has cached, we should not get it again from cache file in the same process.
|
||||
auto &context = CompileCacheContext::GetInstance();
|
||||
if (context.has_cached_queue_name()) {
|
||||
return queue_name;
|
||||
}
|
||||
auto &config_mng = ConfigManager::GetInstance();
|
||||
if (config_mng.dataset_phase().empty()) {
|
||||
config_mng.set_dataset_phase(dataset_phase);
|
||||
}
|
||||
const auto &filename = GetDataQueueNameCachePath(std::to_string(CompileCacheManager::data_queue_num_));
|
||||
MS_LOG(INFO) << "Get data queue name from file " << filename;
|
||||
std::ifstream json_fs(filename);
|
||||
|
|
|
@ -710,7 +710,9 @@ void Resource::GetCompileCacheResource(const py::list &compile_cache_dep_files,
|
|||
MS_LOG(WARNING) << "Check the consistency of dependency files hash failed. Execute all the compilation actions.";
|
||||
return;
|
||||
}
|
||||
context.set_init_compile_cache(true);
|
||||
if (!common::UseHostCollective()) {
|
||||
context.set_init_compile_cache(true);
|
||||
}
|
||||
compile_cache_manager_->InitCompileCacheHash(compile_cache_dep_files);
|
||||
*compile_cache_consistent = compile_cache_manager_->CheckDepFilesHashConsistency();
|
||||
if (!*compile_cache_consistent) {
|
||||
|
|
|
@ -804,8 +804,9 @@ bool GeGraphExecutor::CompileGraph(const KernelGraphPtr &graph,
|
|||
const auto &tensor_order_map = GetParams(graph, &origin_shape);
|
||||
auto &compile_cache_context = CompileCacheContext::GetInstance();
|
||||
auto use_compile_cache = compile_cache_context.UseCompileCache();
|
||||
auto init_compile_cache = compile_cache_context.init_compile_cache();
|
||||
GEGraphOptimization::GetInstance().OptimizeGEGraph(graph);
|
||||
if (use_compile_cache) {
|
||||
if (use_compile_cache && init_compile_cache) {
|
||||
MS_LOG(INFO) << "Use ge compile cache, and skip specific optimization and ge_adapter execution";
|
||||
if (!BuildFakeGraph(graph)) {
|
||||
return false;
|
||||
|
@ -863,8 +864,9 @@ bool GeGraphExecutor::CompileGraph(const FuncGraphPtr &graph, const std::map<str
|
|||
const auto &tensor_order_map = GetParams(graph, &origin_shape);
|
||||
auto &compile_cache_context = CompileCacheContext::GetInstance();
|
||||
auto use_compile_cache = compile_cache_context.UseCompileCache();
|
||||
auto init_compile_cache = compile_cache_context.init_compile_cache();
|
||||
GEGraphOptimization::GetInstance().OptimizeGEGraph(kg);
|
||||
if (use_compile_cache) {
|
||||
if (use_compile_cache && init_compile_cache) {
|
||||
MS_LOG(INFO) << "Use ge compile cache, and skip specific optimization and ge_adapter execution";
|
||||
if (!BuildFakeGraph(graph)) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue