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
ef0b52e7
Commit
ef0b52e7
authored
Oct 28, 2022
by
Ted Themistokleous
Browse files
Assert if both input lengths are empty to parse_if
parent
e612b60c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
src/onnx/parse_if.cpp
src/onnx/parse_if.cpp
+1
-6
No files found.
src/onnx/parse_if.cpp
View file @
ef0b52e7
...
...
@@ -123,12 +123,7 @@ struct parse_if : op_parser<parse_if>
auto
then_lens
=
then_out_shape
.
lens
();
auto
else_lens
=
else_out_shape
.
lens
();
// Throw error if both branches have zero output shapes. Not possible for static
// inputs
if
(
then_lens
.
empty
()
and
else_lens
.
empty
())
{
throw_shapes
();
}
assert
(
not
then_lens
.
empty
()
and
not
else_lens
.
empty
());
auto
handle_empty_branch
=
[](
module_ref
&
mdl
,
int
index
,
const
shape
&
out_shape
)
{
shape
gen_shape
(
shape
(
out_shape
.
type
(),
{
1
},
{
0
}));
...
...
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