File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/plugins/intel_npu/src/plugin/src Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -541,8 +541,8 @@ bool validateModelBatch(const std::shared_ptr<const ov::Model>& model, Logger lo
541
541
ov::Layout layout = ov::layout::get_layout (input);
542
542
543
543
// Batching on plugin is working only when batching is found on 0th dimension
544
- if ((shape.size () && shape[0 ].get_max_length () > 1 ) ||
545
- (ov::layout::has_batch (layout) && ov::layout::batch_idx (layout) == 0 )) {
544
+ if ((shape.size () && shape[intel_npu::utils::BATCH_AXIS ].get_max_length () != intel_npu::utils::DEFAULT_BATCH_SIZE ) ||
545
+ (ov::layout::has_batch (layout) && ov::layout::batch_idx (layout) == intel_npu::utils::BATCH_AXIS )) {
546
546
const auto & staticShape = shape.is_dynamic () ? shape.get_max_shape () : input->get_shape ();
547
547
batchedInputs.insert (params[input_id]->output (0 ));
548
548
@@ -579,8 +579,8 @@ bool validateModelBatch(const std::shared_ptr<const ov::Model>& model, Logger lo
579
579
ov::Layout layout = ov::layout::get_layout (output);
580
580
581
581
// Batching on plugin is working only when batching is found on 0th dimension
582
- if ((shape.size () && shape[0 ].get_max_length () > 1 ) ||
583
- (ov::layout::has_batch (layout) && ov::layout::batch_idx (layout) == 0 )) {
582
+ if ((shape.size () && shape[intel_npu::utils::BATCH_AXIS ].get_max_length () != intel_npu::utils::DEFAULT_BATCH_SIZE ) ||
583
+ (ov::layout::has_batch (layout) && ov::layout::batch_idx (layout) == intel_npu::utils::BATCH_AXIS )) {
584
584
const auto & node = output->input_value (0 );
585
585
const auto & staticShape = shape.is_dynamic () ? shape.get_max_shape () : output->get_shape ();
586
586
batchedOutputs.insert (ov::Output<const ov::Node>(node.get_node (), node.get_index ()));
You can’t perform that action at this time.
0 commit comments