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
5347c679
"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "dc8edad80d64be0781f47f8c7dedcc54acfbb8bb"
Commit
5347c679
authored
Jul 02, 2019
by
Shucai Xiao
Browse files
clang format
parent
6439e3f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
src/include/migraphx/op/multibroadcast.hpp
src/include/migraphx/op/multibroadcast.hpp
+4
-4
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+7
-6
No files found.
src/include/migraphx/op/multibroadcast.hpp
View file @
5347c679
...
@@ -40,7 +40,7 @@ struct multibroadcast
...
@@ -40,7 +40,7 @@ struct multibroadcast
}
}
if
(
input
.
lens
().
size
()
>
output_lens
.
size
())
if
(
input
.
lens
().
size
()
>
output_lens
.
size
())
{
{
MIGRAPHX_THROW
(
"MULTIBROADCAST: inputs dimensions should <= output size"
);
MIGRAPHX_THROW
(
"MULTIBROADCAST: inputs dimensions should <= output size"
);
}
}
...
@@ -49,9 +49,9 @@ struct multibroadcast
...
@@ -49,9 +49,9 @@ struct multibroadcast
{
{
if
(
output_lens
[
i
+
offset
]
!=
input
.
lens
()[
i
]
and
input
.
lens
()[
i
]
!=
1
)
if
(
output_lens
[
i
+
offset
]
!=
input
.
lens
()[
i
]
and
input
.
lens
()[
i
]
!=
1
)
{
{
MIGRAPHX_THROW
(
"MULTIBROADCAST: input shape {"
+
MIGRAPHX_THROW
(
"MULTIBROADCAST: input shape {"
+
to_string_range
(
input
.
lens
())
+
to_string_range
(
input
.
lens
())
+
"} cannot be broadcasted to {"
"} cannot be broadcasted to {"
+
to_string_range
(
output_lens
)
+
+
to_string_range
(
output_lens
)
+
"}!"
);
"}!"
);
}
}
}
}
...
...
src/onnx/onnx.cpp
View file @
5347c679
...
@@ -183,13 +183,14 @@ struct onnx_parser
...
@@ -183,13 +183,14 @@ struct onnx_parser
s1
.
begin
()
+
offset
,
s1
.
begin
()
+
offset
,
out_lens
.
begin
()
+
offset
,
out_lens
.
begin
()
+
offset
,
[
&
](
auto
a
,
auto
b
)
{
[
&
](
auto
a
,
auto
b
)
{
if
(
a
!=
b
and
a
!=
1
and
b
!=
1
)
if
(
a
!=
b
and
a
!=
1
and
b
!=
1
)
{
{
MIGRAPHX_THROW
(
"COMPUTE_BROADCASTLEN: shape {"
+
MIGRAPHX_THROW
(
"COMPUTE_BROADCASTLEN: shape {"
+
to_string_range
(
s0
)
+
"} and {"
+
to_string_range
(
s1
)
+
"} mismatch!"
);
to_string_range
(
s0
)
+
"} and {"
+
}
to_string_range
(
s1
)
+
"} mismatch!"
);
return
std
::
max
(
a
,
b
);
}
});
return
std
::
max
(
a
,
b
);
});
return
out_lens
;
return
out_lens
;
}
}
...
...
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