Skip to content
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

[CB] Return Block manager asserts to destructors #1569

Merged
merged 11 commits into from
Feb 7, 2025

Conversation

iefode
Copy link
Contributor

@iefode iefode commented Jan 16, 2025

Ticket:

@github-actions github-actions bot added the category: continuous batching Continuous batching label Jan 16, 2025
@ilya-lavrenov ilya-lavrenov added this to the 2025.1 milestone Jan 16, 2025
@ilya-lavrenov ilya-lavrenov self-assigned this Jan 16, 2025
@ilya-lavrenov
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov marked this pull request as draft January 16, 2025 12:34
@iefode iefode marked this pull request as ready for review February 4, 2025 09:36
@iefode iefode changed the title [CB] Update Block manager assert [CB] Return Block manager asserts to destructors Feb 4, 2025
src/cpp/src/block_manager.hpp Outdated Show resolved Hide resolved
src/cpp/src/block_manager.hpp Outdated Show resolved Hide resolved
m_free_blocks_num = std::vector<size_t>(m_num_layers, 0);
}
}

~BlockAllocator() {
// sanity check to validate that all blocks are freed
// OPENVINO_ASSERT(m_total_num_blocks == m_free_blocks.size());
for (auto& free_block : m_free_blocks_num) {
size_t free_and_overwritable_block_cnt = free_block + num_overwriteable_blocks();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, we have size_t num_free_blocks(size_t layer_idx) const function for it

@ilya-lavrenov ilya-lavrenov added this pull request to the merge queue Feb 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 6, 2025
@ilya-lavrenov ilya-lavrenov merged commit 8919eb1 into openvinotoolkit:master Feb 7, 2025
62 checks passed
@iefode iefode deleted the block_manager_assert branch February 7, 2025 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants