"...composable_kernel_rocm.git" did not exist on "52f649675740cb2227c16f18c7f410914302c70a"
Commit c98b919f authored by Shucai Xiao's avatar Shucai Xiao
Browse files

code cleanup for the function quantization.cpp

parent 8c8d719f
...@@ -33,14 +33,7 @@ instruction_ref insert_fp16(program& prog, ...@@ -33,14 +33,7 @@ instruction_ref insert_fp16(program& prog,
} }
else else
{ {
if(ins == std::prev(prog.end())) ins_fp16 = prog.insert_instruction(std::next(ins), op::convert{type}, ins);
{
ins_fp16 = prog.add_instruction(op::convert{type}, ins);
}
else
{
ins_fp16 = prog.insert_instruction(std::next(ins), op::convert{}, ins);
}
} }
map_fp16[ins] = ins_fp16; map_fp16[ins] = ins_fp16;
...@@ -79,7 +72,6 @@ void quantize(program& prog, const std::vector<std::string>& ins_names) ...@@ -79,7 +72,6 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
{ {
input_fp16 = insert_fp16(prog, input, shape::half_type, map_fp16); input_fp16 = insert_fp16(prog, input, shape::half_type, map_fp16);
} }
// instruction::replace_argument(ins, input, input_fp16, false);
converted_inputs.push_back(input_fp16); converted_inputs.push_back(input_fp16);
} }
else else
......
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