Commit a97816be authored by charlie's avatar charlie
Browse files

Tidy fix

parent 51b1d6a0
......@@ -67,12 +67,10 @@ struct binary : op_name<Derived>
.same_dims();
auto s0 = inputs.at(0);
auto s1 = inputs.at(1);
if(s0.dynamic() and s1.dynamic() and s0 == s1)
if(s0.dynamic() or s1.dynamic())
{
if(s0 == s1)
return s0;
}
else if(s0.dynamic() or s1.dynamic())
{
MIGRAPHX_THROW("BINARY: " + point_function() + ": fixed-dyn shape for inputs");
}
else if(s0 == s1 and s0.packed())
......
......@@ -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)
{
// 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));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment