Commit c2c7f497 authored by Paul's avatar Paul
Browse files

Format

parent 3101f6fe
......@@ -62,21 +62,21 @@ struct unsqueeze
if(axis_idx < axes.size())
{
std::int64_t step = 1;
if (axis_idx < steps.size())
if(axis_idx < steps.size())
step = steps[axis_idx];
if (step == 0)
if(step == 0)
MIGRAPHX_THROW("UNSQUEEZE: step must be non-zero");
new_lens[i] = step;
if (p < old_strides.size())
if(p < old_strides.size())
{
if ((old_lens[p] % step) != 0)
if((old_lens[p] % step) != 0)
MIGRAPHX_THROW("UNSQUEEZE: Axis dimenstion is not divisible by step");
old_lens[p] /= step;
new_strides[i] = old_strides[p] * old_lens[p];
}
else
{
if (step != 1)
if(step != 1)
MIGRAPHX_THROW("UNSQUEEZE: Step must be 1 for extra axes");
new_strides[i] = 1;
}
......
......@@ -1580,7 +1580,6 @@ TEST_CASE(test_unsqueeze_transpose_step)
expect_shape(s2, migraphx::make_op("unsqueeze", {{"axes", {2}}, {"steps", {2}}}), s1);
}
TEST_CASE(test_unsqueeze_multibroadcast)
{
migraphx::shape s1{migraphx::shape::float_type, {2, 3, 4}, {0, 1, 0}};
......
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