Commit c40d667e authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 140fde0a
...@@ -30,7 +30,7 @@ struct convert : unary<convert> ...@@ -30,7 +30,7 @@ struct convert : unary<convert>
shape compute_shape(std::vector<shape> inputs) const shape compute_shape(std::vector<shape> inputs) const
{ {
check_shapes{inputs, *this}.has(1); check_shapes{inputs, *this}.has(1);
if (inputs.at(0).packed()) if(inputs.at(0).packed())
{ {
return {target_type, inputs.at(0).lens(), inputs.at(0).strides()}; return {target_type, inputs.at(0).lens(), inputs.at(0).strides()};
} }
...@@ -45,8 +45,8 @@ struct convert : unary<convert> ...@@ -45,8 +45,8 @@ struct convert : unary<convert>
return [](auto x) { return x; }; return [](auto x) { return x; };
} }
convert(shape::type_t t) : target_type{t} { } convert(shape::type_t t) : target_type{t} {}
convert() { } convert() {}
}; };
} // namespace op } // namespace op
......
...@@ -28,11 +28,9 @@ TEST_CASE(param_add) ...@@ -28,11 +28,9 @@ TEST_CASE(param_add)
migraphx::program p; migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {2, 3}}; migraphx::shape s{migraphx::shape::float_type, {2, 3}};
auto p1 = p.add_parameter("x", s); auto p1 = p.add_parameter("x", s);
auto hp1 = p.insert_instruction( auto hp1 = p.insert_instruction(std::next(p1), migraphx::op::convert{}, p1);
std::next(p1), migraphx::op::convert{}, p1);
auto p2 = p.add_parameter("y", s); auto p2 = p.add_parameter("y", s);
auto hp2 = p.insert_instruction( auto hp2 = p.insert_instruction(std::next(p2), migraphx::op::convert{}, p2);
std::next(p2), migraphx::op::convert{}, p2);
auto hs = p.add_instruction(migraphx::op::add{}, hp1, hp2); auto hs = p.add_instruction(migraphx::op::add{}, hp1, hp2);
p.add_instruction(migraphx::op::convert{migraphx::shape::float_type}, hs); p.add_instruction(migraphx::op::convert{migraphx::shape::float_type}, hs);
......
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