Skip to content

feat(stinkytofu): warn in the debug output when a ds stage is too sparse for the LDS rate - #14535

Merged
KKyang merged 1 commit into
developfrom
users/kkyang/stinkytofu-ds-pace-warn
Oct 29, 2026
Merged

KKyang merged 1 commit into
developfrom
users/kkyang/stinkytofu-ds-pace-warn

Conversation

@KKyang

@KKyang KKyang commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

JIRA ID : AIHPBLAS-5348

Follow-up to #14531.

Problem

When a ds_load stage's loads need more WMMAs at DsReadCyclesPerLoad than the stage has, the LDS rate cannot finish them by the stage end and the last ds_load lands late. Nothing in the pass output says so, so a DsReadCyclesPerLoad set too high looks like a scheduler bug.

Change

  • DsSpreadPacer::plan records each such stage (rateLimited(): start, end, load count, WMMAs needed). The plan itself is unchanged.
  • The DAG scheduler prints one [CDNA5 dsSpread] WARNING line per recorded stage under PASS_DEBUG, naming the stage, the rate and the shortfall. Release builds and the generated asm are not affected.

Tests

  • DsSpreadPacer: a stage is recorded when the rate does not fit its end, and not when it fits or when no rate is given.
  • DsSpreadPacer: the warning text is checked exactly (rateLimitedMessage).
  • stinkytofu ctest 1817/1817.

…rse for the LDS rate

When a stage's loads need more WMMAs at DsReadCyclesPerLoad than the stage has, the
LDS rate can not finish them by the stage end and the last ds_load lands late. The pacer
now records such stages (DsSpreadPacer::rateLimited) and the DAG scheduler prints one
[CDNA5 dsSpread] WARNING per stage in the pass debug output. The plan is unchanged.

Unit tests: the stage is recorded when the rate does not fit and not otherwise, and the
warning text is checked.
@therock-pr-bot

therock-pr-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: shared/stinkytofu/src/transforms/asm/dag/CDNA5.hpp, shared/stinkytofu/src/transforms/asm/dag/DsSpreadPacer.hpp, shared/stinkytofu/tests/unit/asm/DsSpreadPacerTest.cpp; no test file found
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14535      +/-   ##
===========================================
- Coverage    77.29%   77.29%   -0.00%     
===========================================
  Files         2889     2889              
  Lines       484711   484711              
  Branches     73195    73195              
===========================================
- Hits        374634   374629       -5     
- Misses       85355    85358       +3     
- Partials     24722    24724       +2     
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 50.78% <ø> (-0.02%) ⬇️
TensileLite-Unit 84.06% <ø> (ø)
hipBLAS 90.62% <ø> (ø) Carriedforward from 0e1cfd3
hipBLASLt 68.99% <ø> (ø)
hipCUB 82.68% <ø> (ø) Carriedforward from 0e1cfd3
hipDNN 86.86% <ø> (ø) Carriedforward from 0e1cfd3
hipFFT 38.02% <ø> (ø) Carriedforward from 0e1cfd3
hipRAND 76.12% <ø> (ø) Carriedforward from 0e1cfd3
hipSOLVER 69.67% <ø> (ø) Carriedforward from 0e1cfd3
hipSPARSE 87.03% <ø> (ø) Carriedforward from 0e1cfd3
rocBLAS 68.95% <ø> (ø) Carriedforward from 0e1cfd3
rocFFT 47.34% <ø> (ø) Carriedforward from 0e1cfd3
rocRAND 57.31% <ø> (ø) Carriedforward from 0e1cfd3
rocSOLVER 76.74% <ø> (ø) Carriedforward from 0e1cfd3
rocSPARSE 83.53% <ø> (ø) Carriedforward from 0e1cfd3
rocThrust 93.15% <ø> (ø) Carriedforward from 0e1cfd3

*This pull request uses carry forward flags. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KKyang
KKyang merged commit e9c9997 into develop Oct 29, 2026
335 of 360 checks passed
@KKyang
KKyang deleted the users/kkyang/stinkytofu-ds-pace-warn branch October 29, 2026 02:15
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants