forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate recompilation infrastructure into RuntimeConfigurator (open…
…vinotoolkit#24955) ### Details: - *Integrate dynamic executors recompilation infrastructure into RuntimeConfigurator* - *Allow RuntimeConfigurator to recompile dynamic kernel executors in runtime* - *Employ this approach to enable dynamic MatMul tests (fp32)* ### Tickets: - *143257*
- Loading branch information
1 parent
080f22e
commit b660da8
Showing
31 changed files
with
517 additions
and
320 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (C) 2018-2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "snippets/kernel_executor_table.hpp" | ||
|
||
namespace ov { | ||
namespace snippets { | ||
|
||
void KernelExecutorTable::replace_key_expression(const snippets::lowered::ExpressionPtr& from, const snippets::lowered::ExpressionPtr& to) { | ||
const auto& found = m_table.find(from); | ||
if (found != m_table.end()) { | ||
OPENVINO_ASSERT(m_table.count(to) == 0, "Attempt to replace a value that is already in the KernelExecutorTable"); | ||
m_table.insert({to, found->second}); | ||
m_table.erase(found); | ||
} | ||
} | ||
|
||
void KernelExecutorTable::reset_state(const ExecTableState& state) { | ||
OPENVINO_ASSERT(state.size() == m_table.size(), "Invalid state in restore_state: size mismatch"); | ||
auto state_it = state.begin(); | ||
for (const auto& table_record : m_table) { | ||
const auto& state_record = *state_it++; | ||
OPENVINO_ASSERT(table_record.first == state_record.first, "Invalid state in restore_state: expressions mismatch"); | ||
table_record.second->update_by_config(state_record.second); | ||
} | ||
} | ||
|
||
KernelExecutorTable::ExecTableState KernelExecutorTable::get_state() const { | ||
ExecTableState result; | ||
// Note: we need to clone configs when saving the state, since the configs still stored in the table can | ||
// be modified e.g. by calling update_by_expression(); | ||
for (const auto& record : m_table) | ||
result.emplace_back(std::make_pair(record.first, record.second->get_config()->clone())); | ||
return result; | ||
} | ||
|
||
}// namespace snippets | ||
}// namespace ov |
This file contains 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
Oops, something went wrong.