SWDEV-424603 - Force CPU wait if profiling

Some pytorch tests use a tracer plugin and rely on profiling information
to be reported right after hipDeviceSynchronize()

Change-Id: Ib021a1e7b1a30b3c24de72627c471810f7f7878d


[ROCm/clr commit: 5438b6362e]
Этот коммит содержится в:
German Andryeyev committed 2023-10-06 11:33:06 -04:00
1 родитель 08c94b9a3d
Коммит d593231137
1 file changed
+3
+3
Просмотреть файл
@@ -124,6 +124,9 @@ void HostQueue::finish(bool cpu_wait) {
// If command doesn't contain HW event and runtime didn't request CPU wait,
// then force marker submit
bool force_marker = false;
// Force CPU wait if profiler is enabled. Pytorch tests may use tracer's plugin and rely on
// profiling information to be available right after finish.
cpu_wait = activity_prof::IsEnabled(OP_ID_DISPATCH);
if (AMD_DIRECT_DISPATCH && (command != nullptr) && !cpu_wait) {
void* hw_event =
(command->NotifyEvent() != nullptr) ? command->NotifyEvent()->HwEvent() : command->HwEvent();