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
88f53aa9
Commit
88f53aa9
authored
May 24, 2019
by
Paul
Browse files
Formatting
parent
4506cb47
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
src/tf/tf.cpp
src/tf/tf.cpp
+2
-1
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+9
-6
No files found.
src/tf/tf.cpp
View file @
88f53aa9
...
@@ -409,7 +409,8 @@ struct tf_parser
...
@@ -409,7 +409,8 @@ struct tf_parser
new_weights_shape
[
0
]
=
out_channels
;
new_weights_shape
[
0
]
=
out_channels
;
new_weights_shape
[
1
]
=
1
;
new_weights_shape
[
1
]
=
1
;
// Make sure weights are contiguous before doing reshape
// Make sure weights are contiguous before doing reshape
auto
new_weights
=
prog
.
add_instruction
(
op
::
reshape
{
new_weights_shape
},
make_contiguous
(
weights
));
auto
new_weights
=
prog
.
add_instruction
(
op
::
reshape
{
new_weights_shape
},
make_contiguous
(
weights
));
return
prog
.
add_instruction
(
op
,
{
args
[
0
],
new_weights
});
return
prog
.
add_instruction
(
op
,
{
args
[
0
],
new_weights
});
}
}
...
...
test/tf/tf_test.cpp
View file @
88f53aa9
...
@@ -14,8 +14,11 @@
...
@@ -14,8 +14,11 @@
migraphx
::
program
optimize_tf
(
const
std
::
string
&
name
,
bool
is_nhwc
)
migraphx
::
program
optimize_tf
(
const
std
::
string
&
name
,
bool
is_nhwc
)
{
{
auto
prog
=
migraphx
::
parse_tf
(
name
,
is_nhwc
);
auto
prog
=
migraphx
::
parse_tf
(
name
,
is_nhwc
);
if
(
is_nhwc
)
if
(
is_nhwc
)
migraphx
::
run_passes
(
prog
,
{
migraphx
::
simplify_reshapes
{},
migraphx
::
dead_code_elimination
{},
migraphx
::
eliminate_identity
{}});
migraphx
::
run_passes
(
prog
,
{
migraphx
::
simplify_reshapes
{},
migraphx
::
dead_code_elimination
{},
migraphx
::
eliminate_identity
{}});
return
prog
;
return
prog
;
}
}
...
...
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