Introduce a logging method wrapper for importVerifyModule #14724
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a proposal of a change of the underlying behavior of the
ImporterEx::importVerifyModule
method.It's related to the comments in the
NPU_Compiler/pull/20425
pull request where the switch to the current version of this method has been rejected.The proposal changes the error handling of
importVerifyModule
from writing directly tostd::cerr
to throwing an exception instead. This way different users of this method can decide how they want to handle the error.At the same time this PR contains a helper function which maintains the behavior in this repository - the verifier error, if occurs, will be logged to
std::cerr
. The code adaptation in this repository is also minimal with this approach.Related issue:
NPU_Compiler/issues/20383
Related PR:
NPU_Compiler/pull/20425