Commit c056e69c authored by Jaikrishnan Menon's avatar Jaikrishnan Menon

CPU: More reduce cases

parent c77c9c67
...@@ -1217,11 +1217,16 @@ void Emitter::EMITTER_DECL(EmitReduce) ...@@ -1217,11 +1217,16 @@ void Emitter::EMITTER_DECL(EmitReduce)
{ {
if (reductee_shape.at(1) == 0) if (reductee_shape.at(1) == 0)
{ {
// PUSH_POLYMORPHIC_INSTRUCTION(f_result_element_type, TU += " {\n"
// "Reduce has unhandled element type", " auto arg1 = call_frame->get_tensor_view_data<" + element_type_names[TI(f_result_element_type)] +
// runtime::ngvm::eigen::BroadcastScalarInstruction, ">(" + to_string(inputs[1].get_index()) + ");\n"
// in[1], " auto out = call_frame->get_tensor_view_data<" + element_type_names[TI(f_result_element_type)] +
// out[0]); ">(" + to_string(outputs[0].get_index()) + ");\n"
" EigenArray1d<" + element_type_names[TI(f_result_element_type)] + ">(out, "
EIGEN_VECTOR_FORMAT(outputs[0].get_layout<DenseTensorViewLayout>()->get_size()) ") =\n"
" EigenArray1d<" + element_type_names[TI(f_result_element_type)] + ">(arg1, "
EIGEN_VECTOR_FORMAT(inputs[1].get_layout<DenseTensorViewLayout>()->get_size()) ")(0, 0);\n"
" }\n";
} }
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