Skip to content

[ssbuffer](fix) Delay ops with yield users in topological ordering#774

Merged
hongziqi merged 1 commit into
triton-lang:release/3.2.2-devfrom
Hsyy04:reorder
Jun 25, 2026
Merged

[ssbuffer](fix) Delay ops with yield users in topological ordering#774
hongziqi merged 1 commit into
triton-lang:release/3.2.2-devfrom
Hsyy04:reorder

Conversation

@Hsyy04

@Hsyy04 Hsyy04 commented Jun 24, 2026

Copy link
Copy Markdown

Title: Delay ops with yield users in topological ordering

Summary

Modify the group selection strategy in computeTopologicalOrder to prioritize groups whose operations do not have scf.yield users. This delays operations that update yield arguments to execute as late as possible in the schedule.

Changes

  • Added groupOps member to GroupAdjacencyGraph to track operations belonging to each group
  • Added selectGroup() method that iterates through ready groups and selects the first group where all operations have no yield users
  • Modified computeTopologicalOrder() to use selectGroup() instead of pop_back_val()

Motivation

Operations that feed scf.yield arguments represent values that need to persist across loop iterations. By scheduling these operations later, we can potentially improve register pressure and enable more optimization opportunities.

New contributor declaration

  • I am not making a trivial change, such as fixing a typo in a comment.

  • I have written a PR description following these
    rules.

  • I have run pre-commit run --from-ref origin/main --to-ref HEAD.

  • Select one of the following.

    • I have added tests.
      • /test for lit tests
      • /unittest for C++ tests
      • /python/test for end-to-end tests
    • This PR does not need a test because FILL THIS IN.
  • Select one of the following.

    • I have not added any lit tests.
    • The lit tests I have added follow these best practices,
      including the "tests should be minimal" section. (Usually running Python code
      and using the instructions it generates is not minimal.)

@Hsyy04 Hsyy04 changed the title Reorder [ssbuffer](fix) Delay ops with yield users in topological ordering Jun 24, 2026
@github-actions

Copy link
Copy Markdown

📂 Code Owners — the following files under code ownership were modified.

Please review:

@KanuaK

  • third_party/ascend/lib/DynamicCVPipeline/PlanComputeBlock/ReorderOpsByBlockId.cpp

@WuTYSFG

  • third_party/ascend/lib/DynamicCVPipeline/PlanComputeBlock/ReorderOpsByBlockId.cpp

@hongziqi

  • third_party/ascend/lib/DynamicCVPipeline/PlanComputeBlock/ReorderOpsByBlockId.cpp

🤖 Generated by labeler workflow

@hongziqi hongziqi merged commit 210ec3b into triton-lang:release/3.2.2-dev Jun 25, 2026
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants