Obtain split events under mutex

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-03-01 12:31:40 +00:00
committed by Compute-Runtime-Automation
parent e0a2fe057b
commit b814e20cf7
2 changed files with 2 additions and 0 deletions

View File

@@ -115,6 +115,7 @@ std::vector<CommandQueue *> &BcsSplit::getCmdQsForSplit(NEO::TransferDirection d
}
size_t BcsSplit::Events::obtainForSplit(Context *context, size_t maxEventCountInPool) {
std::lock_guard<std::mutex> lock(this->mtx);
for (size_t i = 0; i < this->marker.size(); i++) {
auto ret = this->marker[i]->queryStatus();
if (ret == ZE_RESULT_SUCCESS) {

View File

@@ -37,6 +37,7 @@ struct BcsSplit {
struct Events {
BcsSplit &bcsSplit;
std::mutex mtx;
std::vector<EventPool *> pools;
std::vector<Event *> barrier;
std::vector<Event *> subcopy;