Info -> warning: Override performance mode to THROUGHPUT for compilation#34666
Open
DariaMityagina wants to merge 2 commits intoopenvinotoolkit:masterfrom
Open
Info -> warning: Override performance mode to THROUGHPUT for compilation#34666DariaMityagina wants to merge 2 commits intoopenvinotoolkit:masterfrom
DariaMityagina wants to merge 2 commits intoopenvinotoolkit:masterfrom
Conversation
| @@ -689,7 +689,7 @@ std::shared_ptr<ov::ICompiledModel> Plugin::compile_model(const std::shared_ptr< | |||
| auto modelToCompile = successfullyDebatched ? batchedModel : model->clone(); | |||
|
|
|||
| if (successfullyDebatched && localConfig.get<PERFORMANCE_HINT>() == ov::hint::PerformanceMode::LATENCY) { | |||
Contributor
There was a problem hiding this comment.
What do you think about:
const bool performanceHintSetByUser = properties.find(ov::hint::performance_mode.name()) != properties.end();
auto modifiedConfig = localConfig;
if (!performanceHintSetByUser) {
_logger.info("Setting performance mode to THROUGHPUT for batched model compilation");
std::stringstream strStream;
strStream << ov::hint::PerformanceMode::THROUGHPUT;
localConfig.update({{ov::hint::performance_mode.name(), strStream.str()}});
graph = compileWithConfig(std::move(modelToCompile), modifiedConfig);
} else if (localConfig.get<PERFORMANCE_HINT>() == ov::hint::PerformanceMode::LATENCY) {
_logger.warning("PERFORMANCE_HINT is explicitly set to LATENCY mode, but batch dimension (N) is detected in the model. The NPU Plugin will reshape the model to batch size 1 and process each batch slice separately.");
_logger.warning("For optimal performance with batched models, THROUGHPUT mode is highly recommended, as LATENCY mode prevents parallel batch processing.");
_logger.warning("If batch detection appears incorrect, verify that the input and output layouts are configured properly.");
}
Contributor
Author
There was a problem hiding this comment.
Done, thanks! Good idea!
b1b9bcb
I will run validation with this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Details:
THROUGHPUTduring compilation whenPLUGIN batchingis applicable is a non-obvious behavior change, we should warn about it.Tickets:
AI Assistance: