Repository navigation
feat(rocSHMEM): accelerate build scripts, #AIROCSHMEM-563 - #15070
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
There was a problem hiding this comment.
🟡 Changes recommended
Auto-selecting Ninja in an existing Unix Makefiles build directory causes a CMake generator mismatch and prevents the scripts from building.
1 open issue
What changed in this PR
This PR aims to speed up rocSHMEM builds by improving parallelism and sharing setup across six build configurations.
Changes:
- Prefer Ninja when available, otherwise use CMake’s default generator.
- Replace the fixed eight build jobs with the CPU count capped at 32, overridable through
BUILD_JOBS. - Centralize ASAN setup, generator detection, and job-count logic in
_common.sh.
| File | Description |
|---|---|
projects/rocshmem/scripts/build_configs/ro_net |
Apply shared setup and configurable parallelism to network builds. |
projects/rocshmem/scripts/build_configs/ro_ipc |
Apply shared setup and configurable parallelism to RO IPC builds. |
projects/rocshmem/scripts/build_configs/ipc_tests_only |
Apply shared setup and configurable parallelism to IPC test builds. |
projects/rocshmem/scripts/build_configs/ipc_single |
Apply shared setup and configurable parallelism to single-node IPC builds. |
projects/rocshmem/scripts/build_configs/gda |
Apply shared setup and configurable parallelism to GDA builds. |
projects/rocshmem/scripts/build_configs/all_backends |
Apply shared setup and configurable parallelism to all-backend builds. |
projects/rocshmem/scripts/build_configs/_common.sh |
Add shared ASAN, generator-selection, and job-count logic. |
Review effort: Balanced
Resource usage report (4gfx1201) |
Resource usage report (8gfx942) |
Resource usage report (4gfx1201) |
PR Pundit review(Testing PR Pundit Code Review agent. Not all comments may be relevant. This is a one-time automated pass: please address what is useful, no need to request a re-review. Please reply to each point, whether it applies or not: we harvest these replies, and both kinds are enormously helpful for tuning the agent. Reach out to @peymanr for suggestions.)
1. 🟠 Should fix: Exported CMAKE_GENERATOR silently ignored on fresh builds: this PR injects
|
Resource usage report (8gfx942) |
TheRock Submodule Bump ActivityNewest first
|

Motivation
scripts/build_configs/{all_backends,gda,ipc_single,ipc_tests_only,ro_ipc,ro_net}: replaced hardcodedcmake --build . --parallel 8withcmake --build . --parallel ${BUILD_JOBS:-$build_jobs}, wherebuild_jobsdefaults tomin($(nproc), 32)— uses more of the machine without defaulting to monopolizing a large shared dev box, still fully overridable viaBUILD_JOBS.-G Ninjato thecmakeconfigure invocation only whenninjais found onPATH, falling back to CMake's own default generator otherwise. Investigation of.ninja_logshowed the per-GPU-arch bitcodeopt/llvm-linksteps (cmake/DeviceBitcode.cmake) are structurally independent across architectures but weren't reliably scheduled in parallel under Unix Makefiles; Ninja schedules them correctly.scripts/build_configs/_common.sh, sourced by all six scripts, holding the shared ASAN/HSA_XNACK, generator-detection, and job-count logic that was previously duplicated verbatim across every script.Issue Tracking
JIRA ID: AIROCSHMEM-563