Skip to content

fix(rocjitsu): detect VGPR WAW races - #8180

Closed
lialan wants to merge 1 commit into
developfrom
users/lialan/rocjitsu_waw_docs_plugin_lifecycle
Closed

lialan wants to merge 1 commit into
developfrom
users/lialan/rocjitsu_waw_docs_plugin_lifecycle

Conversation

@lialan

@lialan lialan commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

ISSUE ID : #8177

Motivation

A global or LDS load can leave a pending result for a VGPR when a later instruction writes that same VGPR. The race detector previously observed only reads of pending VGPR values, so it missed this write-after-load hazard and a late memory completion could overwrite the newer instruction result.

Plugin callbacks must also distinguish architectural instruction writes from simulator setup, memory completion, and temporary read-modify-write bookkeeping to avoid false races and duplicate observations.

Technical Details

  • Add an instruction-write VGPR plugin hook, forward and profile it through plugin groups, and make the race detector report writes that overlap pending memory results.
  • Route SIMD and MFMA/WMMA destination writes through the architectural hook.
  • Coalesce generated DPP/SDWA temporary destination writes into one architectural callback while preserving lane, true16, and byte masks.
  • Suppress internal destination-merge reads while preserving real aliased inactive-lane DPP source reads.
  • Keep work-item initialization and memory writeback on raw VGPR paths so non-instruction updates stay invisible to plugins.
  • Update the race-detector documentation, generator profile gates, lifecycle and hook-ordering coverage, shared test infrastructure, and the gfx950 HIP WAW regression.

JIRA ID

N/A

Test Plan

  • Build rocjitsu_tests with the configured multi-ISA test build.
  • Run the focused execution-plugin, hook-ordering, SIMD/MFMA/WMMA, DPP/SDWA, shared-infrastructure, and race-detector C++ tests.
  • Run the Python generator profile-gate test suite.
  • Run the gfx950 HIP WAW regression.
  • Run the full branch-diff pre-commit sweep.

Test Result

  • Multi-ISA rocjitsu_tests build passed.
  • 87 focused C++ tests passed.
  • 90 generator-profile pytest tests passed.
  • RaceTest.gfx950_waw_global_load_then_alu passed.
  • Full branch-diff pre-commit sweep passed.

Submission Checklist

@github-actions github-actions Bot added documentation Improvements or additions to documentation project: rocjitsu labels Jul 7, 2026
@therock-pr-bot

therock-pr-bot Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
🌿 Branch Name ✅ Pass —
📝 PR Title/Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 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.

@therock-pr-bot

therock-pr-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

@lialan
lialan force-pushed the users/lialan/rocjitsu_waw_docs_plugin_lifecycle branch from df92e46 to 854f844 Compare July 7, 2026 04:29
@lialan
lialan force-pushed the users/lialan/rocjitsu_waw_docs_plugin_lifecycle branch from 854f844 to c94ece3 Compare July 7, 2026 04:52
@github-actions github-actions Bot added the github actions Pull requests that update GitHub Actions code label Jul 7, 2026
@lialan
lialan force-pushed the users/lialan/rocjitsu_waw_docs_plugin_lifecycle branch from c94ece3 to 2b7a90a Compare July 13, 2026 18:01
Add an instruction-write VGPR hook and keep simulator setup/memory writeback on raw VGPR paths so race-detector WAW checks only see architectural instruction writes.

Refresh race-detector docs and add focused lifecycle, profiling, builder, and HIP coverage for the new behavior.
@lialan
lialan force-pushed the users/lialan/rocjitsu_waw_docs_plugin_lifecycle branch from 2b7a90a to 5a8eaea Compare July 16, 2026 14:47
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been inactive for 25 days and will be marked as stale.

If you would like to keep this PR open, please:

  • Add new commits
  • Add a comment explaining why it should remain open

This PR will be automatically closed in 5 days if no further activity occurs.

@github-actions github-actions Bot added the Stale PR has no activity for 25+ days label Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed due to inactivity (30 days with no updates).

If you'd like to continue working on this, feel free to reopen the PR or create a new one.

@github-actions github-actions Bot closed this Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github actions Pull requests that update GitHub Actions code organization: ROCm project: rocjitsu Stale PR has no activity for 25+ days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant