Created by: sneaxiy
AsyncSSAGraphExecutor
is not compatible with ordered DataLoader
, because:
-
AsyncSSAGraphExecutor
would callBuildStrategy::Apply
methods for each sub-graph, so that we cannot get device index usingComputationOpHandle::GetScopeIdx()
. - The ordered non-iterable
DataLoader
would putcreate_py_reader
op inside main program, so that the global scope would have the persistable var of blocking queue. InsideAsyncSSAGraphExecutor
, we have to init variables in local scopes in the reverse order, so that eachcreate_py_reader
op of each device would get the right blocking queue. Otherwise, allcreate_py_reader
ops in all devicecs would get the same blocking queue, i.e., the 1st one insideOrderedMultiDeviceLoDTensorBlockingQueue
.