-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use get_partial_shape to get dynamic shape #26907
Use get_partial_shape to get dynamic shape #26907
Conversation
@PatrikStepan @pereanub @XinWangIntel can you please have a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix 👍
@@ -278,7 +277,7 @@ std::string LevelZeroCompilerInDriver<TableExtension>::serializeIOInfo(const std | |||
|
|||
for (const std::shared_ptr<ov::op::v0::Parameter>& parameter : parameters) { | |||
const ov::element::Type& precision = parameter->get_element_type(); | |||
const size_t rank = parameter->get_shape().size(); | |||
const size_t rank = parameter->get_partial_shape().size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rank can also be dynamic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ArtemySkrebkov, do we need a throw for such cases? I'm pretty sure that we don't support this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we do not support dynamic rank.
Added a throw for this case.
Previously, I thought to rely on PartialShape::size
to throw (there is an assert for dynamic rank), but having a more precise error message sounds good to me too.
Details:
get_shape
will throw if called on dynamic shapeTickets: