SWDEV-491375 - Limit the SW batch size
Applications may submit commands withoout waits for GPU. That causes a growth of SW unreleased commands. Make sure runtime flushes SW queue, if it grows over some threshold, controlled by DEBUG_CLR_MAX_BATCH_SIZE. Change-Id: Ia4d85c24210ef91c394f638ab6b53b14323a0396
Этот коммит содержится в:
@@ -66,7 +66,7 @@ bool HostQueue::terminate() {
|
||||
Command* lastCommand = getLastQueuedCommand(true);
|
||||
if (lastCommand != nullptr) {
|
||||
// Check if CPU batch wasn't flushed for completion with the last command
|
||||
if (GetSubmittionBatch() != nullptr) {
|
||||
if (GetSubmissionBatch() != nullptr) {
|
||||
auto command = new Marker(*this, false);
|
||||
if (command != nullptr) {
|
||||
ClPrint(LOG_DEBUG, LOG_CMD, "Marker queued to ensure finish");
|
||||
@@ -137,13 +137,13 @@ void HostQueue::finish(bool cpu_wait) {
|
||||
if (IS_HIP) {
|
||||
command = getLastQueuedCommand(true);
|
||||
if (command == nullptr) {
|
||||
assert(GetSubmittionBatch() == nullptr &&
|
||||
assert(GetSubmissionBatch() == nullptr &&
|
||||
"Can't claim the queue is finished with the active batch!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Force marker if the batch wasn't sent for CPU update or fence is dirty
|
||||
if (nullptr == command || (GetSubmittionBatch() != nullptr) || vdev()->isFenceDirty()) {
|
||||
if (nullptr == command || (GetSubmissionBatch() != nullptr) || vdev()->isFenceDirty()) {
|
||||
if (nullptr != command) {
|
||||
command->release();
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user