Add WAR dependency representation in taskflow dialect#280
Merged
ShangkunLi merged 7 commits intocoredac:mainfrom Mar 7, 2026
Merged
Add WAR dependency representation in taskflow dialect#280ShangkunLi merged 7 commits intocoredac:mainfrom
ShangkunLi merged 7 commits intocoredac:mainfrom
Conversation
tancheng
reviewed
Mar 6, 2026
adee060 to
0a29870
Compare
HobbitQia
approved these changes
Mar 7, 2026
tancheng
approved these changes
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR: Add WAR Dependency Tracking & Rename Dependency Operands
Summary
This PR introduces Write-After-Read (WAR) dependency tracking to the Taskflow dialect and renames the dependency-related operands for clarity and consistency.
Previously,
TaskflowTaskOponly tracked RAW and WAW dependencies viaread_memrefs/write_memrefsinputs andwrite_outputsresults. WAR dependencies were invisible because read memrefs had no SSA output to form a dependency chain. This PR closes that gap.Changes
1. WAR Dependency Support (
dependency_read_out)dependency_read_outresult segment toTaskflowTaskOpandread_resultsoperand segment toTaskflowYieldOp, creating SSA passthrough for read memrefs.dependency_read_outcount fromdependency_read_incount. Updated printer to emit all result segments.read_output_typesandread_yield_operandsduring loop-to-task conversion.dependency_read_outresults are mapped first;dependency_write_outoverwrites them, preserving correct RAW priority.2. Downstream Pass Compatibility
replaceUsesAndCleanupto handledependency_read_out. Writer'sdependency_read_outresults are replaced before erasing.replaceTaskResultsto propagatedependency_read_outthrough fused tasks.3. Rename
Renamed all dependency-related fields and assembly keywords for consistency:
read_memrefsdependency_read_inwrite_memrefsdependency_write_inread_outputsdependency_read_outwrite_outputsdependency_write_outAnd we also modified the
FuseTaskPass.cppto support the WAR dependency. Could @HobbitQia also help review our modifications on this pass to make sure our modifications are correct?