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
adca9a26
Commit
adca9a26
authored
May 24, 2019
by
Paul
Browse files
Fix cppcheck issues
parent
1eaf0ec3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/tf/tf.cpp
src/tf/tf.cpp
+10
-10
No files found.
src/tf/tf.cpp
View file @
adca9a26
...
@@ -36,7 +36,7 @@ struct tf_parser
...
@@ -36,7 +36,7 @@ struct tf_parser
std
::
unordered_map
<
std
::
string
,
op_func
>
ops
;
std
::
unordered_map
<
std
::
string
,
op_func
>
ops
;
bool
should_transpose
(
instruction_ref
ins
)
bool
should_transpose
(
instruction_ref
ins
)
const
{
{
return
is_nhwc
and
ins
->
get_shape
().
lens
().
size
()
==
4
;
return
is_nhwc
and
ins
->
get_shape
().
lens
().
size
()
==
4
;
}
}
...
@@ -204,17 +204,17 @@ struct tf_parser
...
@@ -204,17 +204,17 @@ struct tf_parser
template
<
class
T
>
template
<
class
T
>
void
add_binary_op
(
std
::
string
name
,
T
x
)
void
add_binary_op
(
std
::
string
name
,
T
x
)
{
{
add_op
(
name
,
[
this
,
x
](
const
attribute_map
&
attributes
,
std
::
vector
<
instruction_ref
>
args
)
{
add_op
(
name
,
[
this
,
x
](
const
attribute_map
&
,
std
::
vector
<
instruction_ref
>
args
)
{
if
(
args
.
size
()
!=
2
)
if
(
args
.
size
()
!=
2
)
MIGRAPHX_THROW
(
"binary operators should have 2 operands"
);
MIGRAPHX_THROW
(
"binary operators should have 2 operands"
);
if
(
contains
(
attributes
,
"data_format"
))
// TODO
{
// if(contains(attributes, "data_format"))
// TODO
// {
//
if(is_nhwc)
//
if(is_nhwc)
//
{
//
{
//
l0 = prog.add_instruction(op::transpose{{0, 3, 1, 2}}, args[1]);
//
l0 = prog.add_instruction(op::transpose{{0, 3, 1, 2}}, args[1]);
//
}
//
}
}
//
}
return
add_broadcastable_binary_op
(
args
[
0
],
args
[
1
],
x
);
return
add_broadcastable_binary_op
(
args
[
0
],
args
[
1
],
x
);
});
});
}
}
...
...
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