SWDEV-516994 - Fix race condition in the implementation of graph AutoFreeOnLaunch on Windows

Change-Id: I3c98d0d4bffe2a9e0aa5cfa24b6c8e9a8087da29
이 커밋은 다음에 포함됨:
Ioannis Assiouras가 2025-02-26 02:36:31 -05:00를 커밋했습니다
1 부모 5930f047bb
커밋 a8f309049d
1 파일이 변경됨
+6
+6
파일 보기
@@ -691,6 +691,12 @@ hipError_t GraphExec::Run(hipStream_t graph_launch_stream) {
if (!topoOrder_.empty()) {
topoOrder_[0]->GetParentGraph()->FreeAllMemory(launch_stream);
topoOrder_[0]->GetParentGraph()->memalloc_nodes_ = 0;
if (!AMD_DIRECT_DISPATCH) {
// The MemoryPool::FreeAllMemory queues a memory unmap command that for !AMD_DIRECT_DISPATCH
// runs asynchonously. Make sure that freeAllMemory is complete before creating new commands
// to prevent races to the MemObjMap.
launch_stream->finish();
}
}
}