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
bb0c1e36
Commit
bb0c1e36
authored
Jul 05, 2019
by
Shucai Xiao
Browse files
clang format
parent
32815c2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+5
-5
src/targets/gpu/device/reduce_sum.cpp
src/targets/gpu/device/reduce_sum.cpp
+1
-1
No files found.
src/onnx/onnx.cpp
View file @
bb0c1e36
...
@@ -544,9 +544,9 @@ struct onnx_parser
...
@@ -544,9 +544,9 @@ struct onnx_parser
attribute_map
attributes
,
attribute_map
attributes
,
const
std
::
vector
<
instruction_ref
>&
)
const
std
::
vector
<
instruction_ref
>&
)
{
{
literal
v
=
parse_value
(
attributes
.
at
(
"value"
));
literal
v
=
parse_value
(
attributes
.
at
(
"value"
));
// return empty literal
// return empty literal
if
(
v
.
get_shape
().
elements
()
==
0
)
if
(
v
.
get_shape
().
elements
()
==
0
)
{
{
return
prog
.
add_literal
(
literal
{});
return
prog
.
add_literal
(
literal
{});
}
}
...
@@ -938,7 +938,7 @@ struct onnx_parser
...
@@ -938,7 +938,7 @@ struct onnx_parser
{
{
migraphx
::
shape
s
;
migraphx
::
shape
s
;
// empty input tensor, output is a scalar
// empty input tensor, output is a scalar
if
(
args
[
0
]
->
get_shape
().
elements
()
==
0
)
if
(
args
[
0
]
->
get_shape
().
elements
()
==
0
)
{
{
s
=
migraphx
::
shape
{
type
,
{
1
},
{
0
}};
s
=
migraphx
::
shape
{
type
,
{
1
},
{
0
}};
}
}
...
@@ -970,9 +970,9 @@ struct onnx_parser
...
@@ -970,9 +970,9 @@ struct onnx_parser
instruction_ref
instruction_ref
parse_expand
(
const
std
::
string
&
,
attribute_map
,
std
::
vector
<
instruction_ref
>
args
)
parse_expand
(
const
std
::
string
&
,
attribute_map
,
std
::
vector
<
instruction_ref
>
args
)
{
{
auto
in_lens
=
args
[
0
]
->
get_shape
().
lens
();
auto
in_lens
=
args
[
0
]
->
get_shape
().
lens
();
migraphx
::
argument
arg_s
=
args
[
1
]
->
eval
();
migraphx
::
argument
arg_s
=
args
[
1
]
->
eval
();
if
(
arg_s
.
empty
())
if
(
arg_s
.
empty
())
{
{
MIGRAPHX_THROW
(
"Parse Expand: cannot handle dynamic shape as input"
);
MIGRAPHX_THROW
(
"Parse Expand: cannot handle dynamic shape as input"
);
}
}
...
...
src/targets/gpu/device/reduce_sum.cpp
View file @
bb0c1e36
...
@@ -8,7 +8,7 @@ namespace device {
...
@@ -8,7 +8,7 @@ namespace device {
void
reduce_sum
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
)
void
reduce_sum
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
)
{
{
reduce
(
stream
,
result
,
arg
,
sum
{},
0
,
id
{},
id
{});
reduce
(
stream
,
result
,
arg
,
sum
{},
0
,
id
{},
id
{});
}
}
...
...
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