SWDEV-502365 - Track last used command
- This change tries to save extra synchronization packets we may insert
as we didnt track the completion signals for every command. We track
the current enqueued command until it exits the enqueue stage. We also
record the exit scope to know if we flushed the caches
- Handle correct release scopes and store completion signal as HW events
- Use a new finishCommand implementation to only wait for the command
passed as the argument
Change-Id: Ie4350c5dd24f5d48dfa6ccbabd892f0544caadcc
[ROCm/clr commit: e03e4f3b5d]
Этот коммит содержится в:
1 родитель
77840f1cb9
Коммит
c8f39ec2b0
12 files changed
+148
-92
No files matched your search
@@ -133,6 +133,24 @@ bool HostQueue::terminate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void HostQueue::finishCommand(Command* command) {
|
||||
if (command == nullptr) {
|
||||
command = getLastQueuedCommand(true);
|
||||
if (command != nullptr) {
|
||||
ClPrint(LOG_DEBUG, LOG_CMD, "No command, awaiting complete status on host");
|
||||
command->awaitCompletion();
|
||||
command->release();
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Check hardware event status for the specific command
|
||||
static constexpr bool kWaitCompletion = true;
|
||||
if (!device().IsHwEventReady(command->event(), kWaitCompletion)) {
|
||||
ClPrint(LOG_DEBUG, LOG_CMD, "No HW event, awaiting complete status on host");
|
||||
command->awaitCompletion();
|
||||
}
|
||||
}
|
||||
|
||||
void HostQueue::finish(bool cpu_wait) {
|
||||
Command* command = nullptr;
|
||||
if (IS_HIP) {
|
||||
|
||||
Reference in new issue
Block a user