Commit 9174d78f authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 4d18329c
......@@ -9,8 +9,7 @@
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
instruction_ref
insert_fp16(program& prog,
instruction_ref insert_fp16(program& prog,
instruction_ref& ins,
shape::type_t type,
std::unordered_map<instruction_ref, instruction_ref>& map_fp16)
......@@ -59,7 +58,7 @@ void quantize_ins(program& prog, const std::vector<std::string>& ins_names)
// if the input is a fp_conversion operator, uses its input
// as its current input
instruction_ref input_fp16{};
if (input->name() == "fp_conversion")
if(input->name() == "fp_conversion")
{
input_fp16 = input->inputs().front();
}
......@@ -78,13 +77,14 @@ void quantize_ins(program& prog, const std::vector<std::string>& ins_names)
if(ins->get_shape().type() != orig_type)
{
instruction_ref ins_orig_type{};
if (ins == std::prev(prog.end()))
if(ins == std::prev(prog.end()))
{
ins_orig_type = prog.add_instruction(op::fp_conversion{orig_type}, ins);
}
else
{
ins_orig_type = prog.insert_instruction(std::next(ins), op::fp_conversion{orig_type}, ins);
ins_orig_type =
prog.insert_instruction(std::next(ins), op::fp_conversion{orig_type}, ins);
}
prog.replace_instruction(ins, ins_orig_type);
......
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