Skip to content

Commit

Permalink
Fix check for dynamic dim
Browse files Browse the repository at this point in the history
Signed-off-by: Skrebkov, Artemy <[email protected]>
  • Loading branch information
ArtemySkrebkov committed Dec 15, 2024
1 parent 16360e0 commit a1369c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ void check_level_zero_attributes_match(const IODescriptor& ioDescriptor, const A
"Maximum number of dimensions supported: " + std::to_string(ZE_MAX_GRAPH_ARGUMENT_DIMENSIONS_SIZE) +
'\n' + "Given: " + std::to_string(ovDimensions.size()));

const uint32_t dynamicDim = std::numeric_limits<uint32_t>::max();
for (size_t index = 0; index < ovDimensions.size(); ++index) {
OPENVINO_ASSERT(
ioDescriptor.shapeFromCompiler.is_dynamic() || ovDimensions[index] == zeDescriptor.info.dims[index],
ovDimensions[index] == zeDescriptor.info.dims[index] || zeDescriptor.info.dims[index] == dynamicDim,
"Shape mismatch for input/output named " + ioDescriptor.nameFromCompiler);
}
for (size_t index = ovDimensions.size(); index < ZE_MAX_GRAPH_ARGUMENT_DIMENSIONS_SIZE; ++index) {
Expand Down

0 comments on commit a1369c4

Please sign in to comment.