Skip to content

[math-libs] Skip rocPRIM benchmark build when amdsmi target is unavailable - #5612

Merged
geomin12 merged 2 commits into
mainfrom
users/jlichtne/ALMIOPEN-2006-rocprim-amdsmi-guard
Jun 4, 2026
Merged

geomin12 merged 2 commits into
mainfrom
users/jlichtne/ALMIOPEN-2006-rocprim-amdsmi-guard

Conversation

@JonathanLichtnerAMD

@JonathanLichtnerAMD JonathanLichtnerAMD commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Guard _rocprim_benchmark_enable on TARGET amdsmi so the prim-isolated CI build (-DTHEROCK_ENABLE_ALL=OFF -DTHEROCK_ENABLE_PRIM=ON) no longer fails configure with get_target_property() called with non-existent target "amdsmi".
  • Full SDK builds are unaffected — amdsmi is declared (via THEROCK_ENABLE_CORE_AMDSMI), so the target is present, and benchmarks build exactly as before.
  • Mirrors the existing precedent at core/CMakeLists.txt:589 for rocrtst.

Background

#4334 added amdsmi to rocPRIM_tests BUILD_DEPS unconditionally for non-Windows, but amdsmi is only declared as a TheRock subproject when THEROCK_ENABLE_CORE_AMDSMI is ON. The prim-isolated CI group doesn't enable CORE, so _therock_cmake_subproject_collect_build_deps blows up before configure completes.

This is breaking the rocm-libraries TheRock-pin bump in ROCm/rocm-libraries#7979 (e.g. Linux (rocthrust,rocprim,hipcub | gfx94X-dcgpu) / Build).

Related upstream tracking: #4651 (rocPRIM should also gracefully skip find_package(amd_smi) when not requested — once that lands, the therock_rocprim_benchmark_deps.cmake workaround can be dropped, but this guard is still the right shape regardless).

Test plan

  • TheRock CI green on full SDK (benchmarks still built — confirm benchmark_* binaries under dist/rocm/)
  • TheRock CI green on any prim-isolated job (configure no longer errors)
  • After merge, repoint rocm-libraries#7979's therock-ref to the merge SHA and re-run its failing build jobs

…lable

Commit 50b96d6 (#4334) added amdsmi to rocPRIM_tests BUILD_DEPS
unconditionally for non-Windows. But amdsmi is only declared as a
subproject when THEROCK_ENABLE_CORE_AMDSMI is ON, so the prim-isolated
CI build (-DTHEROCK_ENABLE_ALL=OFF -DTHEROCK_ENABLE_PRIM=ON) fails at
configure time:

  CMake Error at cmake/therock_subproject.cmake:1502 (get_target_property):
    get_target_property() called with non-existent target "amdsmi".

Guard the benchmark enable on TARGET amdsmi, mirroring the existing
pattern at core/CMakeLists.txt:589 for rocrtst. Full SDK builds are
unaffected (amdsmi target is present, benchmarks build as before);
prim-isolated builds now gracefully disable benchmarks instead of
erroring out.

Related: #4651 (upstream rocPRIM should also skip find_package(amd_smi)
when not requested).
JonathanLichtnerAMD added a commit to ROCm/rocm-libraries that referenced this pull request Jun 3, 2026
Temporary commit to test the prim-isolated build fix from
ROCm/TheRock#5612 (rocPRIM amdsmi guard) against rocm-libraries CI.
To be replaced with the squash-merge SHA once #5612 lands.
@geomin12
geomin12 merged commit 4be597f into main Jun 4, 2026
103 of 113 checks passed
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Jun 4, 2026
@geomin12
geomin12 deleted the users/jlichtne/ALMIOPEN-2006-rocprim-amdsmi-guard branch June 4, 2026 20:39
JonathanLichtnerAMD added a commit to ROCm/rocm-libraries that referenced this pull request Jun 5, 2026
Replaces the temporary branch-tip pin with the squash-merge SHA on
TheRock main, now that ROCm/TheRock#5612 (rocPRIM amdsmi guard) has
landed.
davidd-amd pushed a commit that referenced this pull request Jun 5, 2026
…lable (#5612)

## Summary

- Guard `_rocprim_benchmark_enable` on `TARGET amdsmi` so the
prim-isolated CI build (`-DTHEROCK_ENABLE_ALL=OFF
-DTHEROCK_ENABLE_PRIM=ON`) no longer fails configure with
`get_target_property() called with non-existent target "amdsmi"`.
- Full SDK builds are unaffected — `amdsmi` is declared (via
`THEROCK_ENABLE_CORE_AMDSMI`), so the target is present, and benchmarks
build exactly as before.
- Mirrors the existing precedent at `core/CMakeLists.txt:589` for
`rocrtst`.

## Background

#4334 added `amdsmi` to `rocPRIM_tests` `BUILD_DEPS` unconditionally for
non-Windows, but `amdsmi` is only declared as a TheRock subproject when
`THEROCK_ENABLE_CORE_AMDSMI` is ON. The prim-isolated CI group doesn't
enable CORE, so `_therock_cmake_subproject_collect_build_deps` blows up
before configure completes.

This is breaking the rocm-libraries TheRock-pin bump in
[ROCm/rocm-libraries#7979](ROCm/rocm-libraries#7979)
(e.g. `Linux (rocthrust,rocprim,hipcub | gfx94X-dcgpu) / Build`).

Related upstream tracking: #4651 (rocPRIM should also gracefully skip
`find_package(amd_smi)` when not requested — once that lands, the
`therock_rocprim_benchmark_deps.cmake` workaround can be dropped, but
this guard is still the right shape regardless).

## Test plan

- [ ] TheRock CI green on full SDK (benchmarks still built — confirm
`benchmark_*` binaries under `dist/rocm/`)
- [x] TheRock CI green on any prim-isolated job (configure no longer
errors)
- [ ] After merge, repoint rocm-libraries#7979's `therock-ref` to the
merge SHA and re-run its failing build jobs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants