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

clang format

parent 4e673ca3
......@@ -24,17 +24,19 @@ instruction_ref convert_fp32_fp16(program& prog, instruction_ref& ins)
instruction_ref ins_fp16{};
if(ins->name() == "@literal")
{
shape s = ins->get_shape();
auto l = ins->get_literal();
if (s.type() == shape::float_type)
shape s = ins->get_shape();
auto l = ins->get_literal();
if(s.type() == shape::float_type)
{
auto tv = l.get<const float>();
ins_fp16 = prog.add_literal(literal({shape::half_type, s.lens()}, tv.begin(), tv.end()));
ins_fp16 =
prog.add_literal(literal({shape::half_type, s.lens()}, tv.begin(), tv.end()));
}
else
{
auto tv = l.get<const double>();
ins_fp16 = prog.add_literal(literal({shape::half_type, s.lens()}, tv.begin(), tv.end()));
ins_fp16 =
prog.add_literal(literal({shape::half_type, s.lens()}, tv.begin(), tv.end()));
}
}
else if(ins->name() == "@param")
......
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