Commit 4612b1f9 authored by Jaikrishnan Menon's avatar Jaikrishnan Menon

CPU: Introduce reshape fallback before we switch to Eigen tensors

parent c3364269
......@@ -947,11 +947,15 @@ void runtime::cpu::CPU_Emitter::EmitReshape(codegen::CodeWriter& writer,
writer << "}\n";
}
}
// Other cases (reordering of axes for tensors with rank>2) are not handled yet.
// Other cases
else
{
throw ngraph_error(
"Axis permutation in reshape is not implemented yet for tensors with rank>2");
writer << "kernel::reshape<" << out[0].get_type() << ">(" << args[0].get_name() << ",\n";
writer << " " << out[0].get_name() << ",\n";
writer << " {" << join(args[0].get_shape()) << "},\n";
writer << " {" << join(reshape->get_input_order()) << "},\n";
writer << " {" << join(out[0].get_shape()) << "}\n";
writer << " );\n";
}
#else
kernel::emit_reshape(writer,
......
......@@ -262,6 +262,7 @@ void runtime::cpu::CPU_ExternalFunction::compile()
#include "ngraph/runtime/kernel/reduce.hpp"
#include "ngraph/runtime/kernel/reduce_window.hpp"
#include "ngraph/runtime/kernel/replace_slice.hpp"
#include "ngraph/runtime/kernel/reshape.hpp"
#include "ngraph/runtime/kernel/reverse.hpp"
#include "ngraph/runtime/kernel/select_and_scatter.hpp"
#include "ngraph/runtime/kernel/slice.hpp"
......
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