[IE CLDNN] Disabled choose_impl call for generic nodes in some cases to avoid double...
authorVladimir Paramuzov <vladimir.paramuzov@intel.com>
Tue, 1 Sep 2020 12:00:52 +0000 (15:00 +0300)
committerGitHub <noreply@github.com>
Tue, 1 Sep 2020 12:00:52 +0000 (15:00 +0300)
inference-engine/thirdparty/clDNN/src/graph_optimizer/post_optimize_weights.cpp

index d9c90f8..bee0c19 100644 (file)
@@ -64,7 +64,11 @@ void post_optimize_weights::optimize_weights(T& node, program_impl& p) {
             // set generic_layer's node output layout and implementation
             auto& g_node = node.get_dependency(i);
             g_node.get_output_layout(false);
-            g_node.selected_impl = g_node.type()->choose_impl(p.get_engine(), g_node);
+
+            // Don't run impl selection to avoid double compilation of reorder kernels
+            // in main program and internal program for constant propagation
+            if (!g_node.is_constant())
+                g_node.selected_impl = g_node.type()->choose_impl(p.get_engine(), g_node);
         }
     }