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
a97816be
Commit
a97816be
authored
Oct 25, 2022
by
charlie
Browse files
Tidy fix
parent
51b1d6a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
src/include/migraphx/op/binary.hpp
src/include/migraphx/op/binary.hpp
+3
-5
src/shape.cpp
src/shape.cpp
+1
-1
No files found.
src/include/migraphx/op/binary.hpp
View file @
a97816be
...
@@ -67,12 +67,10 @@ struct binary : op_name<Derived>
...
@@ -67,12 +67,10 @@ struct binary : op_name<Derived>
.
same_dims
();
.
same_dims
();
auto
s0
=
inputs
.
at
(
0
);
auto
s0
=
inputs
.
at
(
0
);
auto
s1
=
inputs
.
at
(
1
);
auto
s1
=
inputs
.
at
(
1
);
if
(
s0
.
dynamic
()
and
s1
.
dynamic
()
and
s0
==
s1
)
if
(
s0
.
dynamic
()
or
s1
.
dynamic
())
{
return
s0
;
}
else
if
(
s0
.
dynamic
()
or
s1
.
dynamic
())
{
{
if
(
s0
==
s1
)
return
s0
;
MIGRAPHX_THROW
(
"BINARY: "
+
point_function
()
+
": fixed-dyn shape for inputs"
);
MIGRAPHX_THROW
(
"BINARY: "
+
point_function
()
+
": fixed-dyn shape for inputs"
);
}
}
else
if
(
s0
==
s1
and
s0
.
packed
())
else
if
(
s0
==
s1
and
s0
.
packed
())
...
...
src/shape.cpp
View file @
a97816be
...
@@ -507,7 +507,7 @@ bool shape::dynamic_dimension::has_optimal() const { return opt != 0; }
...
@@ -507,7 +507,7 @@ bool shape::dynamic_dimension::has_optimal() const { return opt != 0; }
bool
operator
==
(
const
shape
::
dynamic_dimension
&
x
,
const
shape
::
dynamic_dimension
&
y
)
bool
operator
==
(
const
shape
::
dynamic_dimension
&
x
,
const
shape
::
dynamic_dimension
&
y
)
{
{
// don't check opt if both are fixed
// don't check opt if both are fixed
bool
check_opt
=
(
x
.
is_fixed
()
and
y
.
is_fixed
())
?
false
:
true
;
bool
check_opt
=
not
(
x
.
is_fixed
()
and
y
.
is_fixed
());
return
(
x
.
min
==
y
.
min
and
x
.
max
==
y
.
max
and
(
check_opt
?
x
.
opt
==
y
.
opt
:
true
));
return
(
x
.
min
==
y
.
min
and
x
.
max
==
y
.
max
and
(
check_opt
?
x
.
opt
==
y
.
opt
:
true
));
}
}
...
...
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