Commit 70f793b4 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 7eef6cfc
...@@ -1573,7 +1573,7 @@ TEST_CASE(fp32_fp16_test) ...@@ -1573,7 +1573,7 @@ TEST_CASE(fp32_fp16_test)
{ {
std::vector<float> gold_res = {2.0, 4.0, 6.0, 8.0, 10.0, 12.0}; std::vector<float> gold_res = {2.0, 4.0, 6.0, 8.0, 10.0, 12.0};
auto p = create_program(); auto p = create_program();
migraphx::quantize(p, {"all"}); migraphx::quantize(p, {"all"});
p.compile(migraphx::cpu::target{}); p.compile(migraphx::cpu::target{});
auto result = p.eval({}); auto result = p.eval({});
...@@ -1584,7 +1584,7 @@ TEST_CASE(fp32_fp16_test) ...@@ -1584,7 +1584,7 @@ TEST_CASE(fp32_fp16_test)
{ {
std::vector<float> gold_res = {2.0, 4.0, 6.0, 8.0, 10.0, 12.0}; std::vector<float> gold_res = {2.0, 4.0, 6.0, 8.0, 10.0, 12.0};
auto p = create_program(); auto p = create_program();
migraphx::quantize(p, {"all"}); migraphx::quantize(p, {"all"});
p.compile(migraphx::cpu::target{}); p.compile(migraphx::cpu::target{});
auto result = p.eval({}); auto result = p.eval({});
......
...@@ -3337,7 +3337,7 @@ template struct test_logsoftmax_1<1>; ...@@ -3337,7 +3337,7 @@ template struct test_logsoftmax_1<1>;
struct test_fp32_fp16_lall : verify_program<test_fp32_fp16_lall> struct test_fp32_fp16_lall : verify_program<test_fp32_fp16_lall>
{ {
migraphx::program create_program () const migraphx::program create_program() const
{ {
migraphx::program p; migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {2, 3}}; migraphx::shape s{migraphx::shape::float_type, {2, 3}};
...@@ -3353,7 +3353,7 @@ struct test_fp32_fp16_lall : verify_program<test_fp32_fp16_lall> ...@@ -3353,7 +3353,7 @@ struct test_fp32_fp16_lall : verify_program<test_fp32_fp16_lall>
struct test_fp32_fp16_ladd : verify_program<test_fp32_fp16_ladd> struct test_fp32_fp16_ladd : verify_program<test_fp32_fp16_ladd>
{ {
migraphx::program create_program () const migraphx::program create_program() const
{ {
migraphx::program p; migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {2, 3}}; migraphx::shape s{migraphx::shape::float_type, {2, 3}};
...@@ -3369,7 +3369,7 @@ struct test_fp32_fp16_ladd : verify_program<test_fp32_fp16_ladd> ...@@ -3369,7 +3369,7 @@ struct test_fp32_fp16_ladd : verify_program<test_fp32_fp16_ladd>
struct test_fp32_fp16_add : verify_program<test_fp32_fp16_add> struct test_fp32_fp16_add : verify_program<test_fp32_fp16_add>
{ {
migraphx::program create_program() migraphx::program create_program()
{ {
migraphx::program p; migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {2, 3}}; migraphx::shape s{migraphx::shape::float_type, {2, 3}};
...@@ -3386,7 +3386,7 @@ struct test_fp32_fp16_add : verify_program<test_fp32_fp16_add> ...@@ -3386,7 +3386,7 @@ struct test_fp32_fp16_add : verify_program<test_fp32_fp16_add>
struct test_fp32_fp16_sub : verify_program<test_fp32_fp16_sub> struct test_fp32_fp16_sub : verify_program<test_fp32_fp16_sub>
{ {
migraphx::program create_program() migraphx::program create_program()
{ {
migraphx::program p; migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {2, 3}}; migraphx::shape s{migraphx::shape::float_type, {2, 3}};
......
...@@ -115,9 +115,9 @@ TEST_CASE(param_add_sub) ...@@ -115,9 +115,9 @@ TEST_CASE(param_add_sub)
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{migraphx::shape::half_type}, p2); std::next(p2), migraphx::op::convert{migraphx::shape::half_type}, p2);
auto hsum = p.add_instruction(migraphx::op::add{}, hp1, hp2); auto hsum = p.add_instruction(migraphx::op::add{}, hp1, hp2);
auto hdiff = p.add_instruction(migraphx::op::sub{}, hsum, hp2); auto hdiff = p.add_instruction(migraphx::op::sub{}, hsum, hp2);
auto hres = p.add_instruction(migraphx::op::add{}, hdiff, hp1); auto hres = p.add_instruction(migraphx::op::add{}, hdiff, hp1);
p.add_instruction(migraphx::op::convert{migraphx::shape::float_type}, hres); p.add_instruction(migraphx::op::convert{migraphx::shape::float_type}, hres);
return p; return p;
...@@ -145,7 +145,7 @@ TEST_CASE(param_add_sub) ...@@ -145,7 +145,7 @@ TEST_CASE(param_add_sub)
migraphx::quantize(p1, {"all"}); migraphx::quantize(p1, {"all"});
migraphx::run_passes(p1, {migraphx::dead_code_elimination{}}); migraphx::run_passes(p1, {migraphx::dead_code_elimination{}});
EXPECT(p1 == p2); EXPECT(p1 == p2);
} }
} }
......
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