未验证 提交 77d9b4c3 编写于 作者: W WangZhen 提交者: GitHub

[JitLayer]Fix Load error when load path like 'export.jit' (#46279)

上级 3e636ec9
......@@ -70,6 +70,9 @@ const std::vector<std::pair<std::string, std::string>> PdmodelFilePaths(
std::string format_path = path;
ReplaceAll(&format_path, R"(\\)", "/");
ReplaceAll(&format_path, R"(\)", "/");
if (format_path.find("/") == std::string::npos) {
format_path = "./" + format_path;
}
std::string layer_name =
format_path.substr(format_path.find_last_of("/") + 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册