SWDEV-516994 - Fix race condition in the implementation of graph AutoFreeOnLaunch on Windows
Change-Id: I3c98d0d4bffe2a9e0aa5cfa24b6c8e9a8087da29
[ROCm/clr commit: a8f309049d]
Tento commit je obsažen v:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele