"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "f773c7634f92a03d23854fd5f96a8c312c51fab2"
Commit 881665a8 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format'

parent 5447f39c
...@@ -304,7 +304,8 @@ void quantize_int8(program& prog, ...@@ -304,7 +304,8 @@ void quantize_int8(program& prog,
auto f_dot = prog.insert_instruction(ins, op::convert{shape::float_type}, q_dot); auto f_dot = prog.insert_instruction(ins, op::convert{shape::float_type}, q_dot);
auto c_shape = q_dot->get_shape(); auto c_shape = q_dot->get_shape();
std::vector<float> vec_alpha(c_shape.elements(), new_alpha); std::vector<float> vec_alpha(c_shape.elements(), new_alpha);
auto l_alpha = prog.add_literal(literal({shape::float_type, c_shape.lens()}, vec_alpha)); auto l_alpha =
prog.add_literal(literal({shape::float_type, c_shape.lens()}, vec_alpha));
if(inputs.size() == 3 and dot_op.beta != 0.0f) if(inputs.size() == 3 and dot_op.beta != 0.0f)
{ {
...@@ -325,7 +326,7 @@ void quantize_int8(program& prog, ...@@ -325,7 +326,7 @@ void quantize_int8(program& prog,
beta_c = prog.insert_instruction(ins, op::mul{}, l_beta, inputs.back()); beta_c = prog.insert_instruction(ins, op::mul{}, l_beta, inputs.back());
} }
if (orig_type == shape::float_type) if(orig_type == shape::float_type)
{ {
prog.replace_instruction(ins, op::add{}, alpha_ab, beta_c); prog.replace_instruction(ins, op::add{}, alpha_ab, beta_c);
} }
...@@ -337,7 +338,7 @@ void quantize_int8(program& prog, ...@@ -337,7 +338,7 @@ void quantize_int8(program& prog,
} }
else else
{ {
if (orig_type == shape::float_type) if(orig_type == shape::float_type)
{ {
prog.replace_instruction(ins, op::mul{}, l_alpha, f_dot); prog.replace_instruction(ins, op::mul{}, l_alpha, f_dot);
} }
......
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