Skip to content

build: use --offload-jobs for parallel offload compilation - #367

Open
0z5a wants to merge 1 commit into
ROCm:developfrom
0z5a:build/offload-jobs
Open

0z5a wants to merge 1 commit into
ROCm:developfrom
0z5a:build/offload-jobs

Conversation

@0z5a

@0z5a 0z5a commented Nov 5, 2026

Copy link
Copy Markdown

Summary

CMakeLists.txt probes and passes the downstream-only Clang option -parallel-jobs=12. ROCm LLVM removed that spelling (ROCm/llvm-project#3764); ROCm 7.2's amdclang++ --help documents --offload-jobs=<value> instead. On a compiler without the old alias the probe fails and the parallel offload path is silently skipped.

This prefers --offload-jobs=12 and keeps -parallel-jobs=12 as a fallback for older toolchains.

Testing

AMD Instinct MI350X VF (gfx950), ROCm 7.2.0:

cmake -S . -B build -DCMAKE_PREFIX_PATH=/opt/rocm
-- Enabling parallel compile jobs: --offload-jobs=12

cmake --build build -j14
[100%] Built target TransferBench

The configure line confirms the new spelling is selected by the compiler check; the full build links TransferBench successfully.

LLVM 21 renamed the downstream -parallel-jobs= option to --offload-jobs=.
Prefer the supported spelling and keep the old one as a fallback for older
toolchains, so the parallel compile path is not silently dropped.
@0z5a
0z5a requested a review from a team as a code owner November 5, 2026 19:45
Copilot AI balanced review requested due to automatic review settings November 5, 2026 19:45

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants