Skip to content

ci(sanitizers): fix rocjitsu build/run deps for the nightly gate (zstd, C++20 <format>, hipcc PATH) - #340

Merged
amd-vivekag merged 5 commits into
mainfrom
fix/sanitizers-zstd
Aug 7, 2026
Merged

amd-vivekag merged 5 commits into
mainfrom
fix/sanitizers-zstd

Conversation

@amd-vivekag

@amd-vivekag amd-vivekag commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The nightly gfx950 sanitizer gate (added inside the ROCm CI container by #335/#337) failed on a chain of missing build/run dependencies in the pinned rocm/pytorch Ubuntu 22.04 base. This PR installs/wires up the three the rocjitsu build + fixture step need, so the gate now runs end-to-end. Each fix unblocked the next:

  1. zstd (configure). rocjitsu's CMakeLists.txt does find_package(zstd REQUIRED) in config mode, but the image ships no zstd CMake package config and rocjitsu/cmake/ has no Findzstd fallback — configure aborted on Could not find ... zstdConfig.cmake (run 31155146550). Fix: install libzstd-dev + add an in-repo scripts/sanitizers/cmake/Findzstd.cmake shim on CMAKE_MODULE_PATH that wraps the distro libzstd into the zstd::libzstd_shared target rocjitsu aliases from.
  2. C++20 <format> (compile). rocjitsu's util/log.h includes <format>, absent from the image's GCC 12 libstdc++ (landed in libstdc++ 13); amdclang++ auto-selected it and every compile failed with fatal error: format file not found (run 31160603502). The pre-container workflow used gcc-toolset-13 for exactly this. Fix: install g++-13 from the toolchain PPA so amdclang++ picks the newest GCC / a <format>-capable libstdc++.
  3. clang-offload-bundler on PATH (fixtures). hipcc shells out to clang-offload-bundler, which lives in the ROCm LLVM bindir (/opt/rocm/lib/llvm/bin, same dir as the amdclang++ used above) but the image only exports /opt/rocm/bin, so the fixture build failed with clang-offload-bundler not found on PATH (run 31161251100). Fix: prepend the LLVM bindir to PATH.

Verification

On run 31162084250 the container now: builds rocjitsu 273/273 (rj_waitcheck + librocjitsu_dbi_hooks.so link), builds the hipcc fixtures, prepares the GEMM ISA, runs all three GPU recipes on the MI350, and uploads the results artifact. ConSan works: it patches accesses (access_patched=2) and the racy control detects the race (64 conflict findings).

The one remaining gate failure is a stale verdict-baseline shape unrelated to these deps: consan_racy findings no longer contain the literal conflict=true string the baseline expects (current ConSan emits structured ConSan MOI auto replay diagnostic ... messages instead), most likely drift from the unpinned mutable shared/rocjitsu/sanitizers ref. Tracked separately (see linked issue) rather than silently changing what the gate asserts here.

Test plan

  • rocjitsu configure gets past find_package(zstd) and builds rj_waitcheck / rocjitsu_dbi_hooks.
  • hipcc fixtures + ISA prep succeed.
  • All three recipes run and the .sanitizer-nightly/out artifact is produced (clears the prior "No files found" annotation).

Copilot AI balanced review requested due to automatic review settings August 7, 2026 07:56

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.

Pull request overview

Adds zstd support for the nightly rocjitsu sanitizer build.

Changes:

  • Installs libzstd-dev in the CI container.
  • Adds a CMake finder shim and passes its path to rocjitsu.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/sanitizers/cmake/Findzstd.cmake Defines the expected imported zstd target.
.github/workflows/sanitizers-nightly.yml Provisions zstd and configures CMake discovery.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings August 7, 2026 08:10

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 7, 2026 08:19

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings August 7, 2026 08:31

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (3)

scripts/sanitizers/cmake/Findzstd.cmake:5

  • The basic find_package(zstd REQUIRED) signature is not explicitly config mode: CMake searches for Findzstd.cmake first and only falls back to the config package when no module exists. Describing the fallback accurately avoids implying that this newly added module could not be selected.
# The upstream rocjitsu build (ROCm/rocm-systems) does `find_package(zstd
# REQUIRED)` expecting zstd's *config* package (zstdConfig.cmake + the
# zstd::libzstd_shared / zstd::libzstd_static targets). Ubuntu's libzstd-dev

.github/workflows/sanitizers-nightly.yml:102

  • The PR title, summary, Changes list, and test plan describe only zstd provisioning, but this revision also adds a third-party toolchain PPA and GCC 13 here, plus changes the ROCm tool PATH below. These are material CI dependencies discovered in later runs; please update the PR description and test plan so reviewers can assess and verify the full scope.
            #   2. rocjitsu util/log.h pulls in C++20 <format>, absent from the
            #      image default GCC 12 libstdc++ (landed in libstdc++ 13), so
            #      every compile failed with "fatal error: format file not
            #      found" (run 31160603502). The pre-container workflow used
            #      gcc-toolset-13 for this. Install g++-13 from the toolchain PPA

.github/workflows/sanitizers-nightly.yml:94

  • This call uses CMake's basic signature rather than forcing config mode. It reaches the zstdConfig.cmake lookup only because no Findzstd.cmake was available, which is why adding the module path fixes it.
            #   1. rocjitsu configure runs find_package(zstd REQUIRED) in config
            #      mode, but the image ships no zstd CMake package config, so
            #      configure aborted on "Could not find ... zstdConfig.cmake"

@amd-vivekag amd-vivekag changed the title ci(sanitizers): provide zstd for the rocjitsu build ci(sanitizers): fix rocjitsu build/run deps for the nightly gate (zstd, C++20 <format>, hipcc PATH) Aug 7, 2026
@amd-vivekag

Copy link
Copy Markdown
Collaborator Author

Remaining post-merge follow-up (out of scope for this build-deps PR): the consan_racy verdict-baseline shape drift is tracked in #341 (and relates to pinning the RocJITsu ref, #330).

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

.github/workflows/sanitizers-nightly.yml:85

  • The end-to-end verification cited in the PR predates this move: run 31162084250 tested SHA 7e4bb32, while the dependencies were baked into the image later at current SHA 315b7c0. That run therefore exercised the removed runtime-install path, not this Dockerfile-backed path. Please rerun Sanitizers Nightly on the current head to verify that the image builds and supplies CMake, Ninja, zstd, GCC 13, and the shim before keeping the test plan checked.
            # rocjitsu build deps (cmake, ninja, libzstd-dev, g++-13, Findzstd
            # shim) are baked into docker/Dockerfile.ci-gpu; see that file.

amd-vivekag and others added 5 commits August 7, 2026 10:08
The nightly rocjitsu configure does `find_package(zstd REQUIRED)` in config
mode, but the pinned rocm/pytorch Ubuntu 22.04 CI base ships neither libzstd's
headers/lib nor a zstd CMake package config, and rocjitsu's cmake/ dir has no
Findzstd fallback -- so configure aborted with "Could not find ...
zstdConfig.cmake" (run 31155146550), the next missing build dep after the
cmake/ninja fix (#337).

Install libzstd-dev in-container (root, no image change) and add an in-repo
module-mode Findzstd.cmake shim on CMAKE_MODULE_PATH that wraps the distro
libzstd into the zstd::libzstd_shared target rocjitsu aliases from. Ubuntu's
libzstd-dev alone is insufficient (no zstdConfig.cmake), hence the shim.

Co-authored-by: Cursor <[email protected]>
The zstd provisioning comment I added used apostrophes (libzstd's,
rocjitsu's). The regression script is passed to the container via
`bash -lc '...'`, so a stray single quote closed the quoting early and the
shell tried to command-substitute the backticked find_package(zstd
REQUIRED) text (run 31160110567). Reword the comment without any
single-quote characters so the block stays intact.

Co-authored-by: Cursor <[email protected]>
With zstd resolved, the rocjitsu compile then failed 140x with
"fatal error: format file not found": util/log.h includes C++20 <format>,
absent from the Ubuntu 22.04 base GCC 12 libstdc++ (landed in libstdc++ 13),
which amdclang++ auto-selects (run 31160603502). The pre-container workflow
pinned gcc-toolset-13 for exactly this. Install g++-13 from the toolchain
PPA so amdclang++ picks the newest GCC and a <format>-capable libstdc++,
alongside the existing libzstd-dev install.

Co-authored-by: Cursor <[email protected]>
With rocjitsu building cleanly, the fixture step then failed with
"clang-offload-bundler not found on PATH" (run 31161251100): hipcc shells
out to clang-offload-bundler, which lives in the ROCm LLVM bindir
(/opt/rocm/lib/llvm/bin, same dir as the amdclang++ the build used) but the
image only exports /opt/rocm/bin. Prepend the LLVM bindir so hipcc resolves
its tools.

Co-authored-by: Cursor <[email protected]>
Move cmake/ninja (pinned pip), libzstd-dev, g++-13 (toolchain PPA), and
the Findzstd.cmake shim into the CI GPU image at /opt/aorta/cmake. Drop
the runtime apt/pip install block and the in-repo scripts/sanitizers/cmake/
shim from the nightly workflow.

Co-authored-by: Cursor <[email protected]>
Copilot AI review requested due to automatic review settings August 7, 2026 10:15
@amd-vivekag
amd-vivekag force-pushed the fix/sanitizers-zstd branch from 315b7c0 to 61dea46 Compare August 7, 2026 10:15

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

.github/workflows/sanitizers-nightly.yml:86

  • The cited end-to-end verification run used head 7e4bb32, but the current head later moved these dependencies into the image in 61dea46. That run therefore exercised the removed runtime provisioning, not the Dockerfile-baked path referenced here. Please dispatch the nightly workflow at the current SHA and update the verification before relying on these checked-off results.
            # rocjitsu build deps (cmake, ninja, libzstd-dev, g++-13, Findzstd
            # shim) are baked into docker/Dockerfile.ci-gpu; see that file.
            RJ_CMAKE_MODULE_PATH=/opt/aorta/cmake

@amd-vivekag
amd-vivekag merged commit 440dc27 into main Aug 7, 2026
11 checks passed
@amd-vivekag
amd-vivekag deleted the fix/sanitizers-zstd branch August 7, 2026 10:54
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