Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use INFO instead of WARNING for an unused graph input. #1235

Merged
2 changes: 1 addition & 1 deletion onnxruntime/core/framework/session_state_initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ common::Status SaveInputOutputNamesToNodeMapping(const onnxruntime::Graph& graph
if (input_map.find(name) == end_map) {
// dummy entry for an input that we didn't find a use of in the graph. warn about it in case that's a bug.
// utils::CopyOneInputAcrossDevices will use the input OrtValue as is given we don't believe it's used anywhere.
LOGS(session_state.Logger(), WARNING) << "Graph input with name " << name << " is not associated with a node. ";
LOGS(session_state.Logger(), INFO) << "Graph input with name " << name << " is not associated with a node. ";
skottmckay marked this conversation as resolved.
Show resolved Hide resolved
ORT_RETURN_IF_ERROR(session_state.AddInputNameToNodeInfoMapping(name, empty_node_info));
}
}
Expand Down
7 changes: 4 additions & 3 deletions onnxruntime/core/graph/graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1321,8 +1321,9 @@ Status Graph::InferAndVerifySubgraphTypes(const Node& node, Graph& subgraph,
" inputs and requires ", num_required_subgraph_inputs,
" inputs. Either provide all subgraph inputs, or just the required inputs.");
}
subgraph_inputs = &required_subgraph_inputs;
num_subgraph_inputs = num_required_subgraph_inputs;

subgraph_inputs = &required_subgraph_inputs;
num_subgraph_inputs = num_required_subgraph_inputs;
}

// apply type/shape info to the subgraph's inputs
Expand Down Expand Up @@ -2222,7 +2223,7 @@ void Graph::CleanUnusedInitializers() {
for (const auto& pv : name_to_initial_tensor_) {
const std::string& name = pv.first;
if (used_args.find(name) == end) {
LOGS_DEFAULT(WARNING) << name << " exists in this graph's initializers but it is not used by any node";
LOGS_DEFAULT(INFO) << name << " exists in this graph's initializers but it is not used by any node";
erase_list.push_back(name);
}
}
Expand Down