-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[NPU] Add compatibility checks before compiling model with compiler in plugin #24502
base: master
Are you sure you want to change the base?
[NPU] Add compatibility checks before compiling model with compiler in plugin #24502
Conversation
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.
Looks good
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.
I'll try to take a closer look tomorrow.
@@ -163,6 +163,11 @@ bool NPUBackends::isBatchingSupported() const { | |||
return false; | |||
} | |||
|
|||
bool NPUBackends::isCompilerFallbackRequired() const { | |||
static const uint32_t lastCompatibleVersion = 2196; |
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.
Will this require manual maintenance?
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.
I think this method will be updated and, in the end removed in the future. This check is added in order to prevent CID fallback for some drivers (that don't have graph extension 1.6) that could use CIP instead. However, CIP is continuously being developed and I don't expect for the compatibility between older drivers and CIP to persist. When the last driver that doesn't contain graph extension 1.6 will be 'not supported' by CIP, we will be able to remove this check altogether.
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.
Does it work for both linux and windows drivers?
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.
I've updated this check to work for both
uint32_t patch; | ||
|
||
inline bool isCompatible(const Version& other) const { | ||
return this->major == other.major && this->minor == other.minor; // TODO: needs confirmation |
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.
Just a reminder to remove this comment upon receiving the confirmation. Perhaps we should do this prior to merging the PR.
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.
What kind of confirmation do we need here? If we still need such a confirmation after merging the PR, could we open a ticket and remove this comment?
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.
We should be able to support backward compatibility by this check. So we need to support cases when driver minor version >= compiler minor version
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.
updated the check and moved it inside plugin.cpp
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.
Sorry, I do not see the check inside plugin.cpp
I see that we checked that versions are not nullpts and then adding them into config. Am I missing something?
@ArtemySkrebkov @pereanub @PatrikStepan Could 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.
Minor comment, but the changes look good!
uint32_t patch; | ||
|
||
inline bool isCompatible(const Version& other) const { | ||
return this->major == other.major && this->minor == other.minor; // TODO: needs confirmation |
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.
What kind of confirmation do we need here? If we still need such a confirmation after merging the PR, could we open a ticket and remove this comment?
Details:
Tickets: