update akg kernel meta dir path

update kernel meta path
This commit is contained in:
Zichun Ye 2022-09-05 19:59:52 +08:00
parent 6078b2f350
commit f855fecbd8
8 changed files with 9 additions and 9 deletions

2
akg

@ -1 +1 @@
Subproject commit 751fc1693d06d732266c063867f4acfc79c6fe63
Subproject commit b591f4756eb9f04cf2bcf5bfe524a33ad92dc08d

View File

@ -38,7 +38,7 @@
namespace mindspore {
namespace kernel {
constexpr auto kAkgKernelMeta = "kernel_meta/";
constexpr auto kAkgKernelMeta = "akg_kernel_meta/";
constexpr auto kProcessorAiCore = "aicore";
constexpr auto kProcessorAiCpu = "aicpu";
constexpr auto kProcessorCuda = "cuda";

View File

@ -203,7 +203,7 @@ void TbeUtils::LoadCache() {
}
auto akg_config_path = GetCompilerCachePath();
auto akg_path = akg_config_path + kAkgKernelMeta;
if (!bin_map->ReadIndex(akg_path)) {
if (access(akg_path.c_str(), F_OK) != -1 && !bin_map->ReadIndex(akg_path)) {
MS_LOG(INFO) << "Akg Cache initialize failed[" << akg_path << "]";
}
has_load = true;

View File

@ -211,7 +211,7 @@ bool AkgKernelBuilder::CompileJsonsInAnfnodes(const AnfNodePtrList &node_list) {
std::map<AnfNodePtr, std::string> node_info_map;
std::set<std::string> uniq_info_names;
auto dir_path =
SaveNodesInfo(node_list, "./kernel_meta", AkgKernelBuilder::json_option(), &node_info_map, &uniq_info_names);
SaveNodesInfo(node_list, "./akg_kernel_meta", AkgKernelBuilder::json_option(), &node_info_map, &uniq_info_names);
if (dir_path.empty()) {
return false;
}

View File

@ -62,7 +62,7 @@ bool GraphKernelSplitterWithTuning::StartTuning(const std::string &dir_path) con
}
void SignTunedGraphs(const FuncGraphPtr &func_graph) {
auto kernel_meta = FileUtils::GetRealPath("./kernel_meta/");
auto kernel_meta = FileUtils::GetRealPath("./akg_kernel_meta/");
if (!kernel_meta.has_value()) {
return;
}

View File

@ -96,8 +96,8 @@ def _compile_akg_task_ascend(json_strs, attrs):
print_compile_log(compile_log)
# Select best compile result
res = select_best([os.path.join(akg_compile_dir, "kernel_meta"), os.path.join(tbe_compile_dir, "kernel_meta")],
kernel_meta_dir, op_name)
res = select_best([os.path.join(akg_compile_dir, "akg_kernel_meta"), os.path.join(
tbe_compile_dir, "kernel_meta")], kernel_meta_dir, op_name)
if not res:
if log_level == "ERROR":
raise ValueError("Compile error, json str: {}! build attrs: {}".format(json_str, attrs))

View File

@ -65,7 +65,7 @@ def get_kernel_meta_parent_dir():
def get_ascend_compile_dirs():
"""Get several Ascend compile dirs."""
kernel_meta_dir = os.path.join(get_kernel_meta_parent_dir(), "kernel_meta")
kernel_meta_dir = os.path.join(get_kernel_meta_parent_dir(), "akg_kernel_meta")
compile_dirs = {"kernel_meta_dir": kernel_meta_dir,
"akg_compile_dir": os.path.join(kernel_meta_dir, "akg"),
"tbe_compile_dir": os.path.join(kernel_meta_dir, "tbe"),

View File

@ -51,7 +51,7 @@ def _get_cache_path():
"""
cache_path = os.getenv('MS_COMPILER_CACHE_PATH')
if cache_path is None:
cache_path = "./kernel_meta/"
cache_path = "./akg_kernel_meta/"
elif cache_path[-1] != "/":
cache_path = cache_path + "/"