Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
39cc651d
Commit
39cc651d
authored
Apr 11, 2019
by
Khalique
Browse files
formatting
parent
03b861f1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
src/onnx/read_onnx.cpp
src/onnx/read_onnx.cpp
+1
-1
src/program.cpp
src/program.cpp
+10
-9
No files found.
src/onnx/read_onnx.cpp
View file @
39cc651d
...
...
@@ -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
);
}
}
src/program.cpp
View file @
39cc651d
...
...
@@ -54,10 +54,7 @@ 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
,
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment