"llm/git@developer.sourcefind.cn:orangecat/ollama.git" did not exist on "c18ff18b2c95a8a39dcd7148c0311e8409221ec5"
Commit 39cc651d authored by Khalique's avatar Khalique
Browse files

formatting

parent 03b861f1
......@@ -7,7 +7,7 @@ int main(int argc, char const* argv[])
{
std::string file = argv[1];
auto prog = migraphx::parse_onnx(file);
//std::cout << prog << std::endl;
// std::cout << prog << std::endl;
prog.print_graph(std::cout);
}
}
......@@ -54,14 +54,11 @@ static void print_instruction(std::ostream& os,
os << " -> " << ins->get_shape();
}
static std::string enclose_name(const std::string& name)
{
return '"' + name + '"';
}
static std::string enclose_name(const std::string& name) { return '"' + name + '"'; }
static void print_graph_node(std::ostream& os,
instruction_ref ins,
const std::unordered_map<instruction_ref, std::string>& names)
instruction_ref ins,
const std::unordered_map<instruction_ref, std::string>& names)
{
os << "\t";
......@@ -84,12 +81,16 @@ static void print_graph_node(std::ostream& os,
// else
// os << "{" << ins->get_literal() << "}";
// }
}
template <class F>
static void print_program(std::ostream& os, const program& p, F annonate,
std::function<void(std::ostream&,instruction_ref,const std::unordered_map<instruction_ref, std::string>&)>print_func=print_instruction)
static void print_program(
std::ostream& os,
const program& p,
F annonate,
std::function<void(
std::ostream&, instruction_ref, const std::unordered_map<instruction_ref, std::string>&)>
print_func = print_instruction)
{
std::unordered_map<instruction_ref, std::string> names;
int count = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment