Fix error in calling is_dynamic (#13769)

This commit is contained in:
Taylor Yeonbok Lee 2022-11-03 23:31:41 -07:00 committed by GitHub
parent f1fe3a2f65
commit e9e3044d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View File

@ -102,8 +102,8 @@ std::string concatenation_inst::to_string(concatenation_node const& node) {
concatenation_inst::typed_primitive_inst(network& network, concatenation_node const& node)
: parent(network, node) {
if (node.is_dynamic()) return;
auto input_layout = node.input().get_output_layout();
if (input_layout.is_dynamic()) return;
auto output_layout = node.get_output_layout();

View File

@ -120,7 +120,8 @@ void concat_input_order::run(program& p) {
// 4. Not already aligned
// 5. Users can accept shuffled features
// 6. No fused primitives
if (!node->is_type<concatenation>() || node->is_output() || (node->is_valid_output_layout() && node->is_dynamic()))
if (!node->is_type<concatenation>() || node->is_output() ||
(node->is_valid_output_layout() && node->get_output_layout().is_dynamic()))
continue;
auto& concat_node = node->as<concatenation>();

View File

@ -67,6 +67,8 @@ struct concat_in_place_optimization : pattern_match_optimization_typed<concat_in
bool concat_noop_optimization::match(concatenation_node& node) {
if (node.is_output() && !get_program().is_debug_build())
return false;
if (node.is_valid_output_layout() && node.get_output_layout().is_dynamic())
return false;
return node.get_dependencies().size() == 1 &&
!node.has_fused_primitives() &&
node.get_fused_activations_funcs().empty();
@ -86,6 +88,8 @@ bool concat_in_place_optimization::match(concatenation_node& node) {
return false;
if (node.has_fused_primitives() || !node.get_fused_activations_funcs().empty())
return false;
if (node.is_valid_output_layout() && node.get_output_layout().is_dynamic())
return false;
bool is_onednn_impl = false;
@ -311,7 +315,7 @@ void prepare_buffer_fusing::run(program& p) {
If crop is before concat there can be padding mismtach, since concat changes padding.
*/
auto can_optimize = [](const program_node* node) {
if ((node->is_valid_output_layout() && node->is_dynamic()) || node->is_output() || (!node->get_fused_activations_funcs().empty())) {
if ((node->is_valid_output_layout() && node->get_output_layout().is_dynamic()) || node->is_output() || (!node->get_fused_activations_funcs().empty())) {
return false;
}
return true;

View File

@ -21,7 +21,6 @@ const std::vector<ov::AnyMap> AutoConfigs = {
};
const std::vector<ov::AnyMap> AutoNotSupportConfigs = {
{ov::device::priorities(CommonTestUtils::DEVICE_GPU)}
};
std::shared_ptr<ngraph::Function> getFunction1() {