MCPcopy Create free account
hub / github.com/ROCm/clr / finishCommand

Method finishCommand

rocclr/platform/commandqueue.cpp:154–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void HostQueue::finishCommand(Command* command) {
155 if (command == nullptr) {
156 command = getLastQueuedCommand(true);
157 if (command != nullptr) {
158 ClPrint(LOG_DETAIL_DEBUG, LOG_CMD, "No command, awaiting complete status on host");
159 command->awaitCompletion();
160 command->release();
161 }
162 return;
163 }
164 // Check hardware event status for the specific command
165 static constexpr bool kWaitCompletion = true;
166 if (!device().IsHwEventReady(command->event(), kWaitCompletion)) {
167 ClPrint(LOG_DETAIL_DEBUG, LOG_CMD, "No HW event, awaiting complete status on host");
168 command->awaitCompletion();
169 }
170}
171
172void HostQueue::finish(bool cpu_wait) {
173 Command* command = nullptr;

Callers 2

ihipMemcpyFunction · 0.80
ihipMemcpyCmdEnqueueFunction · 0.80

Calls 4

eventMethod · 0.80
awaitCompletionMethod · 0.45
releaseMethod · 0.45
IsHwEventReadyMethod · 0.45

Tested by

no test coverage detected