Repository navigation
ci(sanitizers): fix rocjitsu build/run deps for the nightly gate (zstd, C++20 <format>, hipcc PATH) - #340
Conversation
There was a problem hiding this comment.
Pull request overview
Adds zstd support for the nightly rocjitsu sanitizer build.
Changes:
- Installs
libzstd-devin 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.
There was a problem hiding this comment.
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 forFindzstd.cmakefirst 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.cmakelookup only because noFindzstd.cmakewas 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"
There was a problem hiding this comment.
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 SHA315b7c0. 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.
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]>
315b7c0 to
61dea46
Compare
There was a problem hiding this comment.
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 in61dea46. 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
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/pytorchUbuntu 22.04 base. This PR installs/wires up the three therocjitsubuild + fixture step need, so the gate now runs end-to-end. Each fix unblocked the next:rocjitsu'sCMakeLists.txtdoesfind_package(zstd REQUIRED)in config mode, but the image ships no zstd CMake package config androcjitsu/cmake/has noFindzstdfallback — configure aborted onCould not find ... zstdConfig.cmake(run 31155146550). Fix: installlibzstd-dev+ add an in-reposcripts/sanitizers/cmake/Findzstd.cmakeshim onCMAKE_MODULE_PATHthat wraps the distro libzstd into thezstd::libzstd_sharedtargetrocjitsualiases from.<format>(compile).rocjitsu'sutil/log.hincludes<format>, absent from the image's GCC 12 libstdc++ (landed in libstdc++ 13);amdclang++auto-selected it and every compile failed withfatal error: format file not found(run 31160603502). The pre-container workflow usedgcc-toolset-13for exactly this. Fix: installg++-13from the toolchain PPA soamdclang++picks the newest GCC / a<format>-capable libstdc++.clang-offload-bundleron PATH (fixtures).hipccshells out toclang-offload-bundler, which lives in the ROCm LLVM bindir (/opt/rocm/lib/llvm/bin, same dir as theamdclang++used above) but the image only exports/opt/rocm/bin, so the fixture build failed withclang-offload-bundler not found on PATH(run 31161251100). Fix: prepend the LLVM bindir toPATH.Verification
On run 31162084250 the container now: builds
rocjitsu273/273 (rj_waitcheck+librocjitsu_dbi_hooks.solink), builds thehipccfixtures, 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_racyfindings no longer contain the literalconflict=truestring the baseline expects (current ConSan emits structuredConSan MOI auto replay diagnostic ...messages instead), most likely drift from the unpinned mutableshared/rocjitsu/sanitizersref. Tracked separately (see linked issue) rather than silently changing what the gate asserts here.Test plan
rocjitsuconfigure gets pastfind_package(zstd)and buildsrj_waitcheck/rocjitsu_dbi_hooks.hipccfixtures + ISA prep succeed..sanitizer-nightly/outartifact is produced (clears the prior "No files found" annotation).