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
55b09edb
Commit
55b09edb
authored
Nov 01, 2022
by
charlie
Browse files
Fix bugs
parent
931fe619
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/include/migraphx/op/broadcast.hpp
src/include/migraphx/op/broadcast.hpp
+2
-2
src/onnx/parse_binary_op.cpp
src/onnx/parse_binary_op.cpp
+2
-2
No files found.
src/include/migraphx/op/broadcast.hpp
View file @
55b09edb
...
...
@@ -128,8 +128,8 @@ struct broadcast
{
MIGRAPHX_THROW
(
"BROADCAST_2in: s0 length doesn't match with static s1 axis "
"dimension length ("
+
migraphx
::
to_string
(
s0
.
dyn_dim
s
()[
0
])
+
" != "
+
migraphx
::
to_string
(
s1
.
dyn_dim
s
()[
axis
])
+
")"
);
migraphx
::
to_string
(
s0
.
len
s
()[
0
])
+
" != "
+
migraphx
::
to_string
(
s1
.
len
s
()[
axis
])
+
")"
);
}
std
::
vector
<
size_t
>
bcast_strides
(
s1
.
ndim
(),
0
);
std
::
copy
(
s0
.
strides
().
begin
(),
s0
.
strides
().
end
(),
bcast_strides
.
begin
()
+
axis
);
...
...
src/onnx/parse_binary_op.cpp
View file @
55b09edb
...
...
@@ -58,10 +58,10 @@ struct parse_binary_op : op_parser<parse_binary_op>
if
(
broadcasted
!=
0
)
{
if
(
std
::
any_of
(
args
.
cbegin
(),
args
.
cend
(),
[](
auto
a
)
{
a
->
get_shape
().
dynamic
();
}))
args
.
cbegin
(),
args
.
cend
(),
[](
auto
a
)
{
return
a
->
get_shape
().
dynamic
();
}))
{
MIGRAPHX_THROW
(
"
b
inary op broadcast attribute not supported for dynamic input shapes"
);
"
B
inary op broadcast attribute not supported for dynamic input shapes"
);
}
uint64_t
axis
=
parser
.
parse_value
(
info
.
attributes
.
at
(
"axis"
)).
at
<
uint64_t
>
();
auto
l
=
info
.
add_instruction
(
...
...
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