Skip to content

Fixed the circular refernece between CPUStreamsExecutor and ExecuterManager#33615

Merged
mlukasze merged 1 commit intoopenvinotoolkit:masterfrom
sgbihu:fix_circliar_ref
Jan 21, 2026
Merged

Fixed the circular refernece between CPUStreamsExecutor and ExecuterManager#33615
mlukasze merged 1 commit intoopenvinotoolkit:masterfrom
sgbihu:fix_circliar_ref

Conversation

@sgbihu
Copy link
Copy Markdown
Contributor

@sgbihu sgbihu commented Jan 15, 2026

Details:

image

The CPUStreamsExecutor :

 explicit Impl(const Config& config)
        : _config{config},
          _streams(
              [this] {
                  return std::make_shared<Impl::Stream>(this);
              },
              this) {
        _exectorMgr = executor_manager();

The ExecutorManagerImpl:

std::shared_ptr<ov::threading::ITaskExecutor> ExecutorManagerImpl::get_executor(const std::string& id) {
    std::lock_guard<std::mutex> guard(taskExecutorMutex);
    auto foundEntry = executors.find(id);
    if (foundEntry == executors.end()) {
        auto newExec = std::make_shared<ov::threading::CPUStreamsExecutor>(ov::threading::IStreamsExecutor::Config{id});
        tbbThreadsCreated = true;
        executors[id] = newExec;
        return newExec;
    }
    return foundEntry->second;
}

Tickets:

@sgbihu sgbihu requested a review from a team as a code owner January 15, 2026 12:42
@github-actions github-actions bot added the category: inference OpenVINO Runtime library - Inference label Jan 15, 2026
@praasz praasz self-assigned this Jan 15, 2026
@praasz praasz added this to the 2026.0 milestone Jan 15, 2026
@sgbihu sgbihu changed the title Fixed the circliar refernece between CPUStreamsExecutor and ExecuterManager Fixed the circular refernece between CPUStreamsExecutor and ExecuterManager Jan 16, 2026
@sgbihu
Copy link
Copy Markdown
Contributor Author

sgbihu commented Jan 17, 2026

build_jenkins

@sgbihu
Copy link
Copy Markdown
Contributor Author

sgbihu commented Jan 18, 2026

build_jenkins

@sgbihu sgbihu force-pushed the fix_circliar_ref branch 3 times, most recently from 542ae70 to ccbe721 Compare January 19, 2026 11:50
@sgbihu
Copy link
Copy Markdown
Contributor Author

sgbihu commented Jan 20, 2026

build_jenkins

2 similar comments
@sgbihu
Copy link
Copy Markdown
Contributor Author

sgbihu commented Jan 20, 2026

build_jenkins

@sgbihu
Copy link
Copy Markdown
Contributor Author

sgbihu commented Jan 20, 2026

build_jenkins

@mlukasze mlukasze added this pull request to the merge queue Jan 21, 2026
Merged via the queue into openvinotoolkit:master with commit 58e66e8 Jan 21, 2026
310 of 350 checks passed
Naseer-010 pushed a commit to Naseer-010/openvino that referenced this pull request Feb 18, 2026
…anager (openvinotoolkit#33615)

### Details:

<img width="1178" height="572" alt="image"
src="https://github.com/user-attachments/assets/706377a9-6a53-43d9-8341-675ef8d0df3d"
/>

The `CPUStreamsExecutor `: 
```
 explicit Impl(const Config& config)
        : _config{config},
          _streams(
              [this] {
                  return std::make_shared<Impl::Stream>(this);
              },
              this) {
        _exectorMgr = executor_manager();
```
The `ExecutorManagerImpl`:
```
std::shared_ptr<ov::threading::ITaskExecutor> ExecutorManagerImpl::get_executor(const std::string& id) {
    std::lock_guard<std::mutex> guard(taskExecutorMutex);
    auto foundEntry = executors.find(id);
    if (foundEntry == executors.end()) {
        auto newExec = std::make_shared<ov::threading::CPUStreamsExecutor>(ov::threading::IStreamsExecutor::Config{id});
        tbbThreadsCreated = true;
        executors[id] = newExec;
        return newExec;
    }
    return foundEntry->second;
}
```


### Tickets:
 - [CVS-179009](https://jira.devtools.intel.com/browse/CVS-179009)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: inference OpenVINO Runtime library - Inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants