Enforcing the pre-computed level when generating dependencies #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original code suffers from a probable inconsistency between the nodes topology decided by
generateTasks
and that of the actual generated DAG.Explanation:
In the task scheduling literature, the level of a node (task)
n
is usually defined as [1]:In DAGGEN, the nodes topology (i.e. the number of nodes in each level) is first decided by
generateTasks
, but it is not enforced later when generating the edges ingenerateDependencies
. More specifically, by considering the above definition of level, a non-entry node that was decided to belong to leveli
might end up belonging to any level between[Max(1, i-jump+1), i]
in the generated DAG. In other words, forjump > 1
the generated DAG is probable to have a drastically different nodes topology from what was decided bygenerateTasks
.To enforce the nodes topology decided by
generateTasks
, every node in leveli
should have at least one parent in leveli-1
.Side note: I also could not think of any other definition for level using which does not result in the explained probable inconsistency between the nodes topology decided by
generateTasks
and that of the generated DAG.[1] H. Arabnejad and J. G. Barbosa, "List Scheduling Algorithm for Heterogeneous Systems by an Optimistic Cost Table," in IEEE Transactions on Parallel and Distributed Systems, vol. 25, no. 3, pp. 682-694, March 2014, doi: 10.1109/TPDS.2013.57.