Skip to content

fix(rocSHMEM): select correct wave size, fix descrepancies in functional tests, #AIROCSHMEM-560 - #14971

Merged
amirsojoodi merged 2 commits into
developfrom
users/asojoodi/rocshmem-fix-tests-wavesize
Nov 6, 2026
Merged

amirsojoodi merged 2 commits into
developfrom
users/asojoodi/rocshmem-fix-tests-wavesize

Conversation

@amirsojoodi

@amirsojoodi amirsojoodi commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Several wave-granularity functional tests hardcoded thread counts (64/128/256/1024) to mean "N wavefronts," assuming a 64-wide wave. On gfx1250 and other 32-wide architectures this silently doubled the intended wave count per workgroup.

  • CTestFunctionalTests.cmake: migrated waveput, waveputnbi, waveget, wavegetnbi, teamwavesync, teamwavebarrier, fence_putwavesignal, fence_putwavenbichunks from literal THREADS to NUM_WF where the test genuinely creates one ROCSHMEM context per wave (MAX_NUM_CONTEXTS = WORKGROUPS * NUM_WF), which derives the thread count from the HIP-runtime-detected warpSize (--num-wf); the same mechanism broadcast_wave/fcollect_wave/tile_*_wave* already use. Also migrated the THREADS 64 data point of waveputsignal, waveputsignalnbi, and wavesignalfetch to NUM_WF 1 so it means "1 wave" on every architecture.
  • Reverted the NUM_WF migration for entries that are actually workgroup-scope (one context per workgroup, not per wave): teamwavesync/teamwavebarrier's WORKGROUPS 32/39 rows, fence_putwavesignal's WORKGROUPS 8/32 rows, and all tile_*_wg_* rows. For these, NUM_WF would have scaled MAX_NUM_CONTEXTS by wave count and changed test semantics, not just the thread count; they keep literal THREADS values (256/1024) representing a fixed max workgroup size.
  • driver.sh: mirrored the surviving NUM_WF migrations using the existing WAVE_SIZE shell variable (already detected via rocminfo for gfx1100/gfx1201/gfx1250), and mirrored the reverted entries with the same literal THREADS values as the cmake file, so the two stay in lockstep.
  • Also fixed a pre-existing driver.sh/cmake mismatch: tile_put_wave_3d/tile_get_wave_3d/tile_put_wave_4d/tile_get_wave_4d are declared NUM_WF 4 in cmake but driver.sh was still passing $WAVE_SIZE (1 wave) instead of $WAVE_SIZE * 4.

The baseline THREADS 32 entries of the signal tests are untouched; that literal is shared with the non-wave putsignal/wgputsignal variants, not wave-size-derived.

Issue Tracking

JIRA ID: AIROCSHMEM-560

@amirsojoodi
amirsojoodi requested a review from a team as a code owner November 3, 2026 21:03
Copilot AI balanced review requested due to automatic review settings November 3, 2026 21:03
@therock-pr-bot

therock-pr-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

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

🙋 Wish to Override Policy?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the wave-count test configuration changes.

No open issues 🎉

What changed in this PR

Updates rocSHMEM’s wave-granularity functional tests to preserve the intended wave count on both 32- and 64-wide GPU architectures.

Changes:

  • Replaces fixed thread counts with NUM_WF in CTest definitions for wave RMA, signal, synchronization, fence, and heatmap tests.
  • Mirrors those changes in the shell driver using WAVE_SIZE, while preserving fixed-thread baseline cases.
File Description
projects/​rocshmem/​tests/​functional_tests/​CTestFunctionalTests.cmake Uses runtime-derived wave counts for affected test configurations.
projects/​rocshmem/​scripts/​functional_tests/​driver.sh Calculates corresponding thread counts from the existing WAVE_SIZE variable.

Review effort: Balanced

@math-ci

math-ci Bot commented Nov 4, 2026

Copy link
Copy Markdown

Resource usage report (4gfx1201)

Dashboard artifact

@math-ci

math-ci Bot commented Nov 4, 2026

Copy link
Copy Markdown

Resource usage report (8gfx942)

Dashboard artifact

@amirsojoodi amirsojoodi changed the title fix(rocSHMEM): select correct wave size for the missing functional tests, #AIROCSHMEM-560 fix(rocSHMEM): select correct wave size, fix descrepancies in functional tests, #AIROCSHMEM-560 Nov 5, 2026
@math-ci

math-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown

Resource usage report (4gfx1201)

Dashboard artifact

@math-ci

math-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown

Resource usage report (8gfx942)

Dashboard artifact

@amirsojoodi
amirsojoodi merged commit 55910ed into develop Nov 6, 2026
60 of 63 checks passed
@amirsojoodi
amirsojoodi deleted the users/asojoodi/rocshmem-fix-tests-wavesize branch November 6, 2026 15:26
@systems-assistant

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.

3 participants