Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GPU] Update condition of NMSIEInternal op convert callback in transformation for legacy static models (#30458)

Wilson Seoka12912027916
diff --git a/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp b/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp
index 6be160d64f6..4a1ec6a8d3c 100644
--- a/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp
+++ b/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp
@@ -834,8 +834,9 @@ void TransformationsPipeline::apply(std::shared_ptr<ov::Model> func) {
pass_config->set_callback<ov::pass::ConvertNMS9ToNMSIEInternal>(
[&](const_node_ptr &node) -> bool {
- // Convert to NMSIEInternal when model is static
- return !func->is_dynamic() ? false : true;
+ // Convert to NMSIEInternal when input shape is static
+ // Otherwise keep NMS op
+ return !node->get_input_partial_shape(0).is_dynamic() ? false : true;
});
// List of enabled/disabled transformations