Do not wait for completion in direct submission controller

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2022-05-18 14:47:46 +00:00
committed by Compute-Runtime-Automation
parent d69bf76282
commit 888c935efb
3 changed files with 12 additions and 55 deletions

View File

@@ -78,21 +78,17 @@ void DirectSubmissionController::checkNewSubmissions() {
auto &state = directSubmission.second;
auto taskCount = csr->peekTaskCount();
if (csr->testTaskCountReady(csr->getTagAddress(), taskCount)) {
if (taskCount == state.taskCount) {
if (state.isStopped) {
continue;
} else {
auto lock = csr->obtainUniqueOwnership();
csr->stopDirectSubmission();
state.isStopped = true;
}
if (taskCount == state.taskCount) {
if (state.isStopped) {
continue;
} else {
state.isStopped = false;
state.taskCount = taskCount;
auto lock = csr->obtainUniqueOwnership();
csr->stopDirectSubmission();
state.isStopped = true;
}
} else {
state.isStopped = false;
state.taskCount = taskCount;
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -31,7 +31,7 @@ class DirectSubmissionController {
protected:
struct DirectSubmissionState {
bool isStopped = false;
bool isStopped = true;
uint32_t taskCount = 0u;
};