Skip to content

ci(sanitizers): install cmake/ninja in the container for the rocjitsu build - #337

Merged
amd-vivekag merged 1 commit into
mainfrom
ci/sanitizers-nightly-cmake-ninja
Aug 7, 2026
Merged

amd-vivekag merged 1 commit into
mainfrom
ci/sanitizers-nightly-cmake-ninja

Conversation

@amd-vivekag

Copy link
Copy Markdown
Collaborator

Summary

The nightly Sanitizers gate builds the rocjitsu sanitizer binaries. Since #335 that build runs inside the pinned ROCm CI container (aorta-ci-gpu). That image ships hipcc but not cmake/ninja, so the build failed with:

bash: line 18: cmake: command not found
Error: Process completed with exit code 127.

(see run 31152762604, commit 667b1a6).

This installs cmake and ninja from PyPI (real prebuilt binaries) right after the editable aorta install, so the rocjitsu build no longer depends on the base image carrying them. The existing command -v ninja guard (from #333) then selects the faster Ninja generator instead of falling back to Make.

Test plan

  • workflow_dispatch the Sanitizers Nightly workflow on this branch and confirm the "Run sanitizer regression" step gets past the cmake/ninja invocation and builds rj_waitcheck / rocjitsu_dbi_hooks.

Note: run 31152762604 also logged a warning that the Docker Hub login failed (ROCM_SHARED_KEY may be expired) and it continued with anonymous pulls. That's a separate runner-secret issue and is not addressed here.

Made with Cursor

… build

The nightly sanitizer gate builds rocjitsu inside the pinned ROCm CI
container (#335). That image ships hipcc but not cmake/ninja, so the
build failed with `cmake: command not found` (exit 127, run
31152762604). Install both from PyPI right after the aorta install so
the build no longer depends on the base image carrying them; the
existing `command -v ninja` check then selects the Ninja generator.

Co-authored-by: Cursor <[email protected]>

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

Installs missing rocjitsu build tools in the pinned ROCm CI container, addressing the documented nightly sanitizer failure.

Changes:

  • Installs PyPI-provided CMake and Ninja binaries.
  • Preserves the existing Ninja detection and fallback behavior.

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

@amd-vivekag
amd-vivekag merged commit 986d813 into main Aug 7, 2026
8 checks passed
@amd-vivekag
amd-vivekag deleted the ci/sanitizers-nightly-cmake-ninja branch August 7, 2026 06:42
amd-vivekag added a commit that referenced this pull request Aug 7, 2026
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]>
amd-vivekag added a commit that referenced this pull request Aug 7, 2026
…d, C++20 <format>, hipcc PATH) (#340)

* ci(sanitizers): provide zstd for the rocjitsu build

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]>

* ci(sanitizers): fix apostrophe breaking the bash -lc heredoc

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]>

* ci(sanitizers): install g++-13 for the rocjitsu C++20 <format> build

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]>

* ci(sanitizers): put ROCm LLVM bindir on PATH for hipcc

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]>

* ci(sanitizers): bake rocjitsu build deps into Dockerfile.ci-gpu

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]>

---------

Co-authored-by: Cursor <[email protected]>
amd-vivekag added a commit that referenced this pull request Aug 7, 2026
cpu-tests.yml triggered on every pull_request with no path filter, so a
CI-only change like #337 (which only edited sanitizers-nightly.yml) spun
up all three pytest (CPU, py3.x) matrix jobs even though nothing under
src/, tests/, or the packaging metadata changed.

Add a `changes` gate mirroring gpu-tests.yml's required-check-safe
pattern: the decision lives in a job + job-level `if` (not a
trigger-level paths: filter, which would strand the required check as
Pending), and it fails open (non-PR events and any error listing files
run the full suite).

Unlike the GPU gate's allow-list, the CPU suite is the catch-all touched
by nearly the whole tree (including docs a test reads, e.g.
docs/layer-numerics.md via test_layer_numerics_docs.py), so this uses a
narrow deny-list instead: run unless every changed file is proven inert
for `pytest -m "not gpu and not rocm"`. A wrong deny entry only runs the
fast suite unnecessarily; it never skips a real code change. Initial
deny-list is `.github/*`, with cpu-tests.yml itself special-cased as
relevant.

Closes #338

Co-authored-by: Cursor <[email protected]>
amd-vivekag added a commit that referenced this pull request Aug 7, 2026
* ci(cpu-tests): skip CPU matrix on PRs that can't affect the suite

cpu-tests.yml triggered on every pull_request with no path filter, so a
CI-only change like #337 (which only edited sanitizers-nightly.yml) spun
up all three pytest (CPU, py3.x) matrix jobs even though nothing under
src/, tests/, or the packaging metadata changed.

Add a `changes` gate mirroring gpu-tests.yml's required-check-safe
pattern: the decision lives in a job + job-level `if` (not a
trigger-level paths: filter, which would strand the required check as
Pending), and it fails open (non-PR events and any error listing files
run the full suite).

Unlike the GPU gate's allow-list, the CPU suite is the catch-all touched
by nearly the whole tree (including docs a test reads, e.g.
docs/layer-numerics.md via test_layer_numerics_docs.py), so this uses a
narrow deny-list instead: run unless every changed file is proven inert
for `pytest -m "not gpu and not rocm"`. A wrong deny entry only runs the
fast suite unnecessarily; it never skips a real code change. Initial
deny-list is `.github/*`, with cpu-tests.yml itself special-cased as
relevant.

Closes #338

Co-authored-by: Cursor <[email protected]>

* address review: fix matrix required-check gap, fail-open edges, wording

Copilot review on #342 surfaced four real issues, all fixed here:

- Required-check hang (actions/runner#952): a matrix job skipped by a
  job-level `if` never emits its per-version pytest (CPU, py3.x)
  contexts, so pinning branch protection to them hangs skipped PRs
  forever -- the opposite of this PR's goal. gpu-tests.yml is safe only
  because its gated job is a single non-matrix job. Add a stable,
  always-running `required` aggregator job (check name "CPU tests") that
  collapses the matrix result into one context reporting on every PR;
  document that branch protection must require it, not the legs.
- Pagination fail-open hole: the /files listing caps at 3000 files, so a
  truncated list of all-ignorable paths could wrongly skip. Read the
  PR's changed_files and fail open when the returned record count is
  short.
- Renames: evaluate both filename and previous_filename so a source file
  moved into an ignored path still counts as a relevant change.
- Inverted safety claim: the deny-list is only fail-open for *omitted*
  entries; an overbroad/wrong entry silently skips tests. Reworded the
  workflow comment and docs to state the asymmetry.

Co-authored-by: Cursor <[email protected]>

* address review: fix stale per-version required-check note in docs

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
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