Skip to content

fix(rocprim): Add proper gfx950 config support, and fix launch_manager Wavefront support - #13251

Merged
stanleytsang-amd merged 1 commit into
developfrom
users/stanleytsang-amd/fix-gfx950-configs-rocprim
Oct 8, 2026
Merged

stanleytsang-amd merged 1 commit into
developfrom
users/stanleytsang-amd/fix-gfx950-configs-rocprim

Conversation

@stanleytsang-amd

Copy link
Copy Markdown
Contributor

Motivation

#12972 introduced a bug - the new launch_manager loses the wavefront size for fallback configs. We are seeing the following failure in CI:

88/91 Test #88: rocprim.linking .............................Subprocess aborted***Exception: 0.26 sec Running main() from /googletest-1.14.0/googletest/src/gtest_main.cc [==========] Running 3 tests from 1 test suite. [----------] Global test environment set-up. [----------] 3 tests from TestLinking [ RUN ] TestLinking.Test0 :0:/TheRock/rocm-systems/projects/clr/hipamd/src/hip_global.cpp:66 : 14973002789391 us: Cannot find Symbol with name: _ZN7rocprim17ROCPRIM_500000_NS6detail17trampoline_kernelINS0_14default_configENS1_20scan_config_selectorIiEEZZZNS1_9scan_implILNS1_25lookback_scan_determinismE0ELb0ELb0ES3_PiS8_iNS0_4plusIiEEiEEDaPvRmT3_T4_T5_mT6_P12ihipStream_tbENKUlT_T0_E_clISt17integral_constantIbLb0EESN_IbLb1EEEEDaSJ_SK_ENKUlSJ_SK_T1_T2_E_clINS1_14launch_managerIS3_NS1_11comp_targetILNS1_3genE0ELNS1_11target_archE4294967295ELNS1_3gpuE0ELNS1_3repE0EEEEES3_S10_SN_INS0_4arch9wavefront6targetELS14_1EEEEDaSJ_SK_SQ_SR_EUlSJ_E0_S10_NS1_30default_config_static_selectorELS14_2EEEvSQ_

Also, gfx950 config support needed some fixing - it was incorrectly listed as both CDNA4 and CDNA3, and also did not support MI355X.

Technical Details

The old make_launch_plan in config_types handled the dynamic wavefront case explicitly. It instantiated trampoline_kernel<..., Target, LaunchSelector, size64> or size32 depending on target_current.warp_size.

visit_config still works out size64/size32 for the fallback branch and passes it to the visitor. But launch_manager::make_launch_plan ignores it. It calls trampoline_kernel<Config, ConfigSelector, Kernel, Target, LaunchSelector>, so TargetWaveSize falls back to its default, get_wavefront_size(Target::g).

For the fallback target, that default differs between host and device. On the host, max_size() is 64 and min_size() is not, so it resolves to dynamic. In the gfx950 device pass, max_size() equals min_size(), so it resolves to size64.
The host therefore asks for a kernel mangled with dynamic. The code object only contains the size64 instantiation, which gives "Cannot find Symbol".

Test Plan

Re ran all tests on gfx950

Test Result

Pass

Submission Checklist

@therock-pr-bot

therock-pr-bot Bot commented Oct 7, 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: projects/hipccl/hipccl3/rocprim/rocprim/include/rocprim/config.hpp, projects/hipccl/hipccl3/rocprim/rocprim/include/rocprim/device/config_types.hpp; 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

therock-pr-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

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

@amd-jmahovsky amd-jmahovsky 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.

LGTM, but onesweep radix sort performance may be changed.

@stanleytsang-amd
stanleytsang-amd merged commit b1b0568 into develop Oct 8, 2026
381 of 391 checks passed
@stanleytsang-amd
stanleytsang-amd deleted the users/stanleytsang-amd/fix-gfx950-configs-rocprim branch October 8, 2026 14:50
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

stanleytsang-amd added a commit that referenced this pull request Oct 17, 2026
…r wavefront support (legacy) (#13881)

## Motivation

Legacy \`projects/rocprim\` has the same bug fixed for hipccl3 in
#13251. \`rocprim.linking\` fails in TheRock CI on gfx950
(https://github.com/ROCm/TheRock/actions/runs/38904910579) with:

\`hip_global.cpp: Cannot find Symbol with name:
_ZN7rocprim17ROCPRIM_400800_NS6detail17trampoline_kernelI...launch_manager...\`

gfx950 config support also needed fixing: it was listed as both CDNA4
and CDNA3, and MI355X was not supported.

## Technical Details

\`visit_config\` resolves size64/size32 for the fallback (dynamic
wavefront) target, but \`launch_manager::make_launch_plan\` ignored it
and called \`trampoline_kernel<..., Target, LaunchSelector>\`, so
\`TargetWaveSize\` fell back to \`get_wavefront_size(Target::g)\`. For
the fallback target that is \`dynamic\` in the host pass but a concrete
size in the gfx950 device pass, so the host looked up a kernel symbol
that is not in the code object.

- \`launch_manager\` takes a \`Wavefront\` template parameter and
forwards it to \`trampoline_kernel\`.
- \`visit_config\` passes the resolved wavefront explicitly in the
fallback branch.
- Removed gfx950 from \`ROCPRIM_IS_CDNA3()\`.
- Added \`gpu::mi355x\` / \`"MI355X"\`.

## Test Plan

Rerun \`rocprim.linking\` and the rocPRIM tests on gfx950 in CI. Not
built or tested locally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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