Fix flush small task task counts

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-05-20 11:31:24 +00:00
committed by Compute-Runtime-Automation
parent fdfb25b85e
commit 341e6bbc3a
5 changed files with 31 additions and 6 deletions

View File

@@ -254,6 +254,10 @@ bool CommandStreamReceiver::waitForCompletionWithTimeout(bool enableTimeout, int
std::chrono::high_resolution_clock::time_point time1, time2;
int64_t timeDiff = 0;
if (this->latestSentTaskCount < taskCountToWait) {
this->flushTagUpdate();
}
uint32_t latestSentTaskCount = this->latestFlushedTaskCount;
if (latestSentTaskCount < taskCountToWait) {
if (!this->flushBatchedSubmissions()) {

View File

@@ -1087,10 +1087,12 @@ uint32_t CommandStreamReceiverHw<GfxFamily>::blitBuffer(const BlitPropertiesCont
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::flushTagUpdate() {
if (this->osContext->getEngineType() == aub_stream::ENGINE_BCS) {
this->flushMiFlushDW();
} else {
this->flushPipeControl();
if (this->osContext != nullptr) {
if (this->osContext->getEngineType() == aub_stream::ENGINE_BCS) {
this->flushMiFlushDW();
} else {
this->flushPipeControl();
}
}
}
@@ -1153,13 +1155,17 @@ void CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
MemorySynchronizationCommands<GfxFamily>::addPipeControlAndProgramPostSyncOperation(commandStream,
PIPE_CONTROL::POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,
getTagAllocation()->getGpuAddress(),
taskCount,
taskCount + 1,
peekHwInfo(),
args);
makeResident(*tagAllocation);
this->flushSmallTask(commandStream, commandStreamStart);
this->latestFlushedTaskCount = taskCount + 1;
this->latestSentTaskCount = taskCount + 1;
taskCount++;
}
template <typename GfxFamily>