Commit 97a83346 authored by Jaikrishnan Menon's avatar Jaikrishnan Menon

CPU Direct Execution: More refactoring

parent 31bc3f96
...@@ -171,7 +171,7 @@ using namespace ngraph; ...@@ -171,7 +171,7 @@ using namespace ngraph;
auto& tensor_data = external_function->get_tensor_data(); \ auto& tensor_data = external_function->get_tensor_data(); \
std::function<void(void*, void*, size_t)> kernel; \ std::function<void(void*, void*, size_t)> kernel; \
\ \
SELECT_KERNEL(kernel, out[0].get_element_type(), runtime::cpu::kernel::OP); \ SELECT_KERNEL(kernel, out[0].get_element_type(), OP); \
\ \
auto element_count = out[0].get_size(); \ auto element_count = out[0].get_size(); \
auto& arg0_tensor = tensor_data[args[0].get_name()]; \ auto& arg0_tensor = tensor_data[args[0].get_name()]; \
...@@ -187,7 +187,7 @@ using namespace ngraph; ...@@ -187,7 +187,7 @@ using namespace ngraph;
auto& tensor_data = external_function->get_tensor_data(); \ auto& tensor_data = external_function->get_tensor_data(); \
std::function<void(void*, void*, void*, size_t)> kernel; \ std::function<void(void*, void*, void*, size_t)> kernel; \
\ \
SELECT_KERNEL(kernel, out[0].get_element_type(), runtime::cpu::kernel::OP); \ SELECT_KERNEL(kernel, out[0].get_element_type(), OP); \
\ \
auto element_count = out[0].get_size(); \ auto element_count = out[0].get_size(); \
auto& arg0_tensor = tensor_data[args[0].get_name()]; \ auto& arg0_tensor = tensor_data[args[0].get_name()]; \
...@@ -208,37 +208,37 @@ namespace ngraph ...@@ -208,37 +208,37 @@ namespace ngraph
template <> template <>
void Builder::BUILDER_DECL(ngraph::op::Add) void Builder::BUILDER_DECL(ngraph::op::Add)
{ {
BUILD_BINARY_ELEMWISE_FUNCTOR(add); BUILD_BINARY_ELEMWISE_FUNCTOR(runtime::cpu::kernel::add);
} }
template <> template <>
void Builder::BUILDER_DECL(ngraph::op::Multiply) void Builder::BUILDER_DECL(ngraph::op::Multiply)
{ {
BUILD_BINARY_ELEMWISE_FUNCTOR(multiply); BUILD_BINARY_ELEMWISE_FUNCTOR(runtime::cpu::kernel::multiply);
} }
template <> template <>
void Builder::BUILDER_DECL(ngraph::op::Abs) void Builder::BUILDER_DECL(ngraph::op::Abs)
{ {
BUILD_UNARY_ELEMWISE_FUNCTOR(abs); BUILD_UNARY_ELEMWISE_FUNCTOR(runtime::cpu::kernel::abs);
} }
template <> template <>
void Builder::BUILDER_DECL(ngraph::op::Ceiling) void Builder::BUILDER_DECL(ngraph::op::Ceiling)
{ {
BUILD_UNARY_ELEMWISE_FUNCTOR(ceil); BUILD_UNARY_ELEMWISE_FUNCTOR(runtime::cpu::kernel::ceil);
} }
template <> template <>
void Builder::BUILDER_DECL(ngraph::op::Relu) void Builder::BUILDER_DECL(ngraph::op::Relu)
{ {
BUILD_UNARY_ELEMWISE_FUNCTOR(relu); BUILD_UNARY_ELEMWISE_FUNCTOR(runtime::cpu::kernel::relu);
} }
template <> template <>
void Builder::BUILDER_DECL(ngraph::op::Result) void Builder::BUILDER_DECL(ngraph::op::Result)
{ {
BUILD_UNARY_ELEMWISE_FUNCTOR(result); BUILD_UNARY_ELEMWISE_FUNCTOR(runtime::cpu::kernel::result);
} }
template <> template <>
......
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