[IE CLDNN] Disabled choose_impl call for generic nodes in some cases to avoid double compilation (#1989)

This commit is contained in:
Vladimir Paramuzov 2020-09-01 15:00:52 +03:00 committed by GitHub
parent c9820a9588
commit aadd461c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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);
}
}