Repository navigation
CI: Fix compute-sanitizer setup and harden mini-CTK fetching - #3397
Conversation
Fetch cuda_sanitizer_api from the same pinned redistrib manifest as the rest of the mini CTK, rather than from whatever release ci/tools/guess_latest.sh scrapes from the redist directory listing. Remove guess_latest.sh, which has no other users.
|
@coderabbitai full review |
Action performed
|
|
No actionable comments were generated in the recent review. Summary
Change: Bug fix Merge Risk:
|
verify-metadata used to warn and pass when a public-server CUDA version had no pinned manifest hash, so the 13.4.2 -> 13.5.0 bump ran unpinned. Fail closed instead, with an explicit fetch_ctk allow-unpinned input (and --allow-unpinned flag) as the opt-out; it never overrides a mismatch against an existing pin. Manifests from an alternate redist server stay warn-only. Pin 13.5.0 and add a test that every CUDA version in ci/versions.yml and every LOCAL_CTK row of ci/test-matrix.yml is pinned.
No caller sets it, and pinning a new CUDA version is a one-line addition to KNOWN_REDISTRIB_SHA256 that the error message points to. Remove the fetch_ctk input and the --allow-unpinned flag; fetch_ctk/action.yml is back to its main-branch form.
Note in ci/versions.yml that each CUDA version there and in LOCAL_CTK matrix rows needs a pin in KNOWN_REDISTRIB_SHA256, and make the coverage test's failure message say where to add the pin and how to compute it.
|
/ok to test bc92709 |
|
/ok to test 27f1b2f |
|
This reverts an earlier decision: PR 594 deliberately selected newer sanitizers to obtain bug fixes while testing older toolkits. A separately pinned sanitizer version would preserve that original intent without runtime scraping. Did you consider that already? It seems preferable to me. |
NVIDIA#2437 made fetch_ctk empty cuda-path before every install. The sanitizer step runs fetch_ctk a second time for cuda_sanitizer_api alone, so it unintentionally deleted the mini CTK installed just before it, and the instrumented test runs failed before any test ran. NVIDIA#2437 then disabled the only matrix rows that run the sanitizer. Add an install-mode input. "add" installs on top of the existing mini CTK at the same cuda-path and keeps the environment the first call exported; the sanitizer step uses it.
With the matrix CTK's own sanitizer, the 12.9.1 and 13.0.2 rows segfaulted partway through the cuda.core tests. With the 13.5.0 sanitizer, both ran the full suite (NVIDIA#3400). This keeps the intent of NVIDIA#594 (newer sanitizer fixes for older toolkits) without the run-time scrape: the version comes from cuda.build.version in ci/versions.yml, which is already pinned.
Good call, thanks. I tested both options in #3400 on Python 3.12 local-CTK rows. With each CTK's own sanitizer, 12.9.1 and 13.0.2 segfaulted partway through the cuda.core tests. With the 13.5.0 sanitizer, both ran the full suite. The sanitizer step now uses the build CTK version (cuda.build.version in ci/versions.yml). That keeps #594's intent with a pinned version, and it moves together with the build CTK. |
|
/ok to test d14706c |
jpascucci-nv
left a comment
There was a problem hiding this comment.
no actionable comments from sol 6.1 high.
Adding cuda_gdb to fetch_ctk's default cuda-components made every Linux job download ~100 MB it does not use (build, docs, coverage, sdist, and test jobs that do not run the cuda-gdb test), and busted the fetch_ctk cache key for all of them. Revert the default-list change. Instead, mirror what NVIDIA#3397 did for cuda_sanitizer_api: a second fetch_ctk call with install-mode: add and cuda-components: "cuda_gdb", gated on LOCAL_CTK == '1' && TEST_CORE == 'true' so only local-CTK jobs that run the cuda.core test fetch it. cuda-gdb has no Windows build, so test-wheel-windows.yml is unchanged. Signed-off-by: Ralf Juengling <rjuengling@nvidia.com>
Description
Follow-up to #3347. This PR fixes the compute-sanitizer setup and hardens and simplifies how CI fetches the mini CTK.
fetch_ctkemptycuda-pathbefore every install, so the sanitizer step, which runsfetch_ctka second time forcuda_sanitizer_apialone, deleted the mini CTK installed just before it. The instrumented test runs then failed at startup because the toolkit headers were gone, and CTK 13.4 prerelease integration #2437 disabled the only matrix rows that run the sanitizer.fetch_ctkgains aninstall-mode: addinput that installs on top of the existing mini CTK and keeps the environment of the first call; the sanitizer step uses it. DO NOT MERGE: probe compute-sanitizer on Python 3.12 local-CTK rows #3400 exercises the fix on Python 3.12 local-CTK rows.fetch_ctknow fails closed when a public-server CUDA version has no pinned manifest hash, instead of warning and continuing. The per-archive hash checks from ci: harden fetch_ctk with manifest/archive verification and optional redist-base-url #3347 are only as trustworthy as that manifest, and sincemainmoved to 13.5.0 it has gone unverified. This PR pins 13.5.0 and adds a test that requires a pin for every CUDA version inci/versions.ymland everyLOCAL_CTK: '1'row ofci/test-matrix.yml, so the next bump fails before merge. Manifests from an alternate redist server stay warn-only, since the public pins do not apply to them.fetch_ctkcall now takes its CUDA version fromci/versions.ymlorci/test-matrix.yml, which is what makes failing closed practical. The sanitizer step installscompute-sanitizerfrom the build CTK (cuda.build.version) instead of the latest release found byci/tools/guess_latest.sh, a run-time scrape of the redist server's directory listing, which this PR removes. That keeps the intent of CI: Install latest compute-sanitizer separately from CTK #594, a newer sanitizer for older toolkits, with a pinned version: in DO NOT MERGE: probe compute-sanitizer on Python 3.12 local-CTK rows #3400 the 12.9.1 and 13.0.2 rows segfaulted partway through thecuda.coretests with their own CTK's sanitizer and ran the full suite with the 13.5.0 one.Checklist