Commit 9a376ca6 authored by pthoreho's avatar pthoreho

- Style fix

- select mkldnn add only if the input_tensor size is >= 1
parent 8578694b
master v0.29.0-rc.0 v0.28.0-rc.1 v0.28.0-rc.0 v0.27.1-rc.3 v0.27.1-rc.2 v0.27.1-rc.1 v0.27.1-rc.0 v0.27.0-rc.1 v0.27.0-rc.0 v0.26.1-rc.0 v0.26.0 v0.26.0-rc.8 v0.26.0-rc.7 v0.26.0-rc.6 v0.26.0-rc.5 v0.26.0-rc.4 v0.26.0-rc.3 v0.26.0-rc.2 v0.26.0-rc.0 v0.25.1-rc.11 v0.25.1-rc.10 v0.25.1-rc.9 v0.25.1-rc.8 v0.25.1-rc.7 v0.25.1-rc.6 v0.25.1-rc.5 v0.25.1-rc.4 v0.25.1-rc.3 v0.25.1-rc.2 v0.25.1-rc.1 v0.25.1-rc.0 v0.25.0 v0.25.0-rc.3 v0.25.0-rc.2 v0.25.0-rc.1 v0.25.0-rc.0 v0.25.0-dev.0 v0.24.0 v0.24.0-rc.3 v0.24.0-rc.2 v0.24.0-rc.1 v0.24.0-rc.0 v0.23.0-rc.7 v0.23.0-rc.6 v0.23.0-rc.5 v0.23.0-rc.4 v0.23.0-rc.3 v0.23.0-rc.2 v0.23.0-rc.1 v0.23.0-rc.0 v0.22.2-rc.0 v0.22.1 v0.22.1-rc.0 v0.22.0 v0.22.0-rc.2 v0.22.0-rc.0 v0.21.0 v0.21.0-rc.1 v0.21.0-rc.0 v0.20.1-rc.4 v0.20.1-rc.3 v0.20.1-rc.2 v0.20.1-rc.1 v0.20.1-rc.0 v0.20.0-rc.2 v0.20.0-rc.1 v0.20.0-rc.0 v0.20.0-dev.0 v0.19.1 v0.19.1-rc.0 v0.19.0 v0.19.0-rc.5 v0.19.0-rc.4 v0.19.0-rc.3 v0.19.0-rc.2 v0.19.0-rc.1 v0.19.0-rc.0 v0.18.1 v0.18.1-rc.1 v0.18.1-rc.0 v0.18.0 v0.18.0-rc.2 v0.18.0-rc.1 v0.18.0-rc.0 v0.17.0-rc.1 v0.17.0-rc.0 v0.16.0-rc.3 v0.16.0-rc.2 v0.16.0-rc.1 v0.16.0-rc.0 v0.15.1-rc.2 v0.15.1-rc.1 v0.15.0 v0.15.0-rc.2 v0.15.0-rc.1 v0.15.0-rc.0 v0.14.0 v0.14.0-rc.1 v0.14.0-rc.0 v0.13.0 v0.12.0 v0.12.0-rc.2 v0.12.0-rc.1 v0.12.0-rc.0 v0.11.1 v0.11.0 v0.11.0-rc.1 v0.11.0-rc.0 v0.10.1 v0.10.0 v0.10.0-rc.6 v0.10.0-rc.5 v0.10.0-rc.4 v0.10.0-rc.3 v0.10.0-rc.2 v0.10.0-rc.1 v0.10.0-rc.0 v0.9.1 v0.9.1-rc.0 v0.9.0 v0.9.0-rc.5 v0.9.0-rc.4 v0.9.0-rc.3 v0.9.0-rc.2 v0.9.0-rc.1 v0.9.0-rc.0 v0.8.2-rc.0 v0.8.1 v0.8.1-rc.0 v0.8.0 v0.8.0-rc.2 v0.8.0-rc.1 v0.8.0-rc.0 v0.7.0 v0.6.0 v0.6.0rc0 v0.6.0-rc.0 v0.6.0-rc0 v0.5.0 v0.4.0 v0.3.0 v0.2.1 v0.2.1-rc0 v0.2.0 v0.2.0-rc1 v0.2.0-rc0 v0.1.0 v0.1.0-rc2 v0.1.0-rc1 v0.1.0-rc0 v0.0.0
No related merge requests found
......@@ -48,6 +48,9 @@ namespace ngraph
{
auto add = static_cast<op::Add*>(node);
auto arg0_shape = node->get_input_shape(0);
auto arg1_shape = node->get_input_shape(1);
auto arg0_rank = arg0_shape.size();
auto arg1_rank = arg1_shape.size();
auto src_size = 1;
for (size_t i = 0; i < node->get_input_shape(0).size(); i++)
......@@ -57,7 +60,8 @@ namespace ngraph
// insert Add as MKLDNN op, only if the src_size is big. this is to avoid MKLDNN overhead
// for smaller tensor sizes
if (node->get_input_element_type(0) == element::f32 &&
node->get_input_element_type(1) == element::f32 && src_size > 64000)
node->get_input_element_type(1) == element::f32 && arg0_rank >= 1 &&
arg1_rank >= 1 && src_size > 64000)
{
auto op_annotations =
std::make_shared<ngraph::runtime::cpu::CPUOpAnnotations>();
......
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