Skip to content

Commit

Permalink
update the method name
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorSVC committed Feb 25, 2025
1 parent 9d1ed6f commit c489b6b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions onnxruntime/core/framework/graph_partitioner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,9 @@ static Status InlineFunctionsAOTImpl(const ExecutionProviders& execution_provide
}

// Validate the ep_context_path to make sure it is file path and check whether the file exist already
static Status EpContextFilePathCheckOrGet(const std::filesystem::path& ep_context_path,
const std::filesystem::path& model_path,
std::filesystem::path& context_cache_path) {
static Status GetValidatedEpContextPath(const std::filesystem::path& ep_context_path,
const std::filesystem::path& model_path,
std::filesystem::path& context_cache_path) {
if (!ep_context_path.empty()) {
context_cache_path = ep_context_path;
if (!context_cache_path.has_filename()) {
Expand Down Expand Up @@ -719,7 +719,7 @@ static Status CreateEpContextModel(const ExecutionProviders& execution_providers
};

std::filesystem::path context_cache_path;
ORT_RETURN_IF_ERROR(EpContextFilePathCheckOrGet(ep_context_path, graph.ModelPath(), context_cache_path));
ORT_RETURN_IF_ERROR(GetValidatedEpContextPath(ep_context_path, graph.ModelPath(), context_cache_path));

Model ep_context_model(graph.Name(), false, graph.GetModel().MetaData(),
graph.GetModel().ModelPath(), // use source model path so that external initializers can find the data file path
Expand Down Expand Up @@ -1066,7 +1066,7 @@ Status GraphPartitioner::Partition(Graph& graph, FuncManager& func_mgr,
std::string ep_context_path = config_options.GetConfigOrDefault(kOrtSessionOptionEpContextFilePath, "");
// Check before EP compile graphs
std::filesystem::path context_cache_path;
ORT_RETURN_IF_ERROR(EpContextFilePathCheckOrGet(ep_context_path, graph.ModelPath(), context_cache_path));
ORT_RETURN_IF_ERROR(GetValidatedEpContextPath(ep_context_path, graph.ModelPath(), context_cache_path));
}

// We use this only if Resource Aware Partitioning is enabled for any of the EPs
Expand Down

0 comments on commit c489b6b

Please sign in to comment.