Skip to content

[amd-staging-rocgdb-18] ROCgdb cherry picks from origin/amd-staging (2026-08-14) - #281

Draft
lumachad wants to merge 12 commits into
amd-staging-rocgdb-18from
users/lumachad/amd-staging-rocgdb-18/cherry-picks-20260814
Draft

[amd-staging-rocgdb-18] ROCgdb cherry picks from origin/amd-staging (2026-08-14)#281
lumachad wants to merge 12 commits into
amd-staging-rocgdb-18from
users/lumachad/amd-staging-rocgdb-18/cherry-picks-20260814

Conversation

@lumachad

Copy link
Copy Markdown
Collaborator

Commits:

03249c8 github: drop ROCM_PATH when --try-rocm-path is not passed
a8af09d gdb, testsuite: fix 'no such variable' error in gdb.rocm/hip-catch-errors.exp
3f88d0a github: improve TheRock dependency update workflow
1da6a00 github: test_rocgdb.py: add --fraction/-f parallel job scaling
df2a43f gdb: extend maint print address-spaces to show all dbgapi available info
28717a4 Revert "github: improve TheRock dependency update workflow"
f6b393d github: improve TheRock dependency update workflow
4280ac3 [ci] Fetch build and CPU test runner dynamically from therock-ci-config
54fb5dd gdb.rocm/omp-target-basic: handle firstprivate compiler type bug gracefully
7c39ce7 gdb.rocm/alu-exceptions: prevent ROCr core dumps on exceptions
b4f6bab github: remove push triggers, run CI only on PRs
c126c43 github: tighten CI workflow security settings

lumachad and others added 12 commits August 14, 2026 05:06
Remove secrets: inherit from all reusable workflow calls since no named
secrets are explicitly referenced; AWS authentication is handled via OIDC.

Remove the /runner/config bind-mount and AWS_SHARED_CREDENTIALS_FILE env
var from the build container, as boto3 will use credentials set by the
OIDC configure-aws-credentials step instead.

Guard the Post Build Upload step against fork PRs to prevent S3 uploads
from untrusted forks.

Addresses ROCM-26823.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit f5601c3)
TheRock CI and pre-commit were running on both push and pull_request
events. Since every change goes through a PR, the push runs on
amd-staging are redundant and waste CI resources.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 0e4734a)
…efully

Issue an XFAIL only when the bug presents itself, avoiding an XPASS.

(cherry picked from commit 8d57cb8)
Previously the build job hardcoded azure-linux-scale-rocm (Azure) and
the CPU test job hardcoded aws-linux-scale-rocm-prod (AWS). Both
labels are now selected dynamically from ROCm/therock-ci-config's
runner-config.json (build_runners.linux.default, highest-weight entry)
so CI tracks fleet changes without manual updates.

The setup job in therock-ci.yml checks out therock-ci-config and reads
the runner label via ci_config_api.py, passing it as build_runs_on to
therock-ci-linux.yml (new workflow_call input). therock-test-packages.yml
applies the same logic in configure_test_matrix for the CPU test runner.
Both steps fall back to aws-linux-scale-rocm-prod if therock-ci-config
is unavailable (e.g., in forks).

The runner-selection logic is extracted into .github/scripts/select_runner.py
to avoid duplication between the two workflows.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit cc4697e)
Move THEROCK_COMMIT_REF and the build container digest out of
therock-ci-linux.yml and into .github/configs.json, a plain data file
documented in .github/configs.md. A resolve job reads and validates the
pins and exposes them as outputs; the build job references those outputs
for container.image and THEROCK_COMMIT_REF. This lets the automated
update workflow push changes with only contents: write on the
GITHUB_TOKEN.

The update script is reworked accordingly:

- Fetch the TheRock branch HEAD and committer timestamp from the GitHub
  REST API (retried on transient failures) instead of git ls-remote and
  date.today(). Fetch the build image creation timestamp from the OCI
  config blob instead of date.today(). Both timestamps are stored in
  full ISO 8601 format and gated per pin so an unchanged value keeps
  its original timestamp. Timestamp fetches are skipped in dry-run mode.
- Validate all API response fields with descriptive errors; guard
  required config keys before any git side-effects.
- PR title is "Automated TheRock dependency update (<date>)"; body
  lists each bumped pin with its short ref and date.
- Print both tracked values on every run with clear update / unchanged
  labels; name what would change in dry-run mode.

Add a comprehensive unit test suite covering all public functions,
including retry logic, error paths, timestamp gating, and the
run_update state machine.

(cherry picked from commit 1dfad84)
This reverts commit 1dfad84.

(cherry picked from commit 6b70fad)
The maint print address-spaces command previously printed only a flat
list of address-space names.  Rewrite address_spaces_dump to query
dbgapi for five properties per address space and emit them as a
structured ui_out table: name, DWARF number, address size in bits, null
address, and access class.

A new helper, address_space_access_to_string, maps the
amd_dbgapi_address_space_access_t enum to a human-readable string (all,
program-constant, dispatch-constant).  The command help text and the
maint print address-spaces section in gdb.texinfo are updated to
document the new columns.

A new test, gdb.rocm/maint-print-address-spaces.exp, runs the command,
and checks that a header row and at least one data row are printed
without error.

(cherry picked from commit 92775a3)
Add -f/--fraction F as an alternative to -j/--jobs for controlling
parallelism.  The two options are mutually exclusive.  When --fraction
is given, the job count is resolved as max(1, int(cpu_count * F)),
allowing callers to request a hardware-proportional limit without
knowing the exact core count of the target machine.

Both options still require --parallel.

(cherry picked from commit 33f3678)
Move the inline python3 -c validation out of the resolve step into a
standalone .github/scripts/config.py script. The script validates each
requested field against an allow-list of known fields and their expected
formats (40-char hex SHA for therock_commit_ref, ghcr.io sha256 digest
for build_image), and writes field=value pairs to $GITHUB_OUTPUT.

Also guard the validate() call against non-string field values (e.g. null
or a number in configs.json) so the script emits the friendly error message
rather than an uncaught TypeError traceback.

(cherry picked from commit e761ce9)
…rors.exp

Running gdb.rocm/hip-catch-errors.exp in an environment where the
__hipOnError symbol is not defined gives

  ERROR: tcl error sourcing <path-to>/gdb/testsuite/gdb.rocm/hip-catch-errors.exp.
  ERROR: can't read "res": no such variable
      while executing
  "return $res"
      ("uplevel" body line 27)
        invoked from within
  "uplevel 1 $body"
      invoked from within
  "with_test_prefix preparation_test {
      with_rocm_gpu_lock {
          clean_restart ${::testfile}.dbg
          if {![runto_main]} {
            return false
          }
          gdb_test_mul..."

Fix this by defining "res" at an earlier point.

The problem here is in fact deeper.  The code body that is used in
preparation_test has return statements.  One would expect the return
statements to actually return from preparation_test early and not even
reach `return $res`, but that's not happening because of how
with_rocm_gpu_lock and with_lock are defined and use Tcl's uplevel.
Fixing them will be more involved and should be addressed separately.

(cherry picked from commit 3a93be6)
A system-wide ROCM_PATH can redirect LLVM tool lookups away from the
artifacts tree configured by setup_environment, causing hard-to-diagnose
test failures.  Strip it from the subprocess environment whenever the
caller has not explicitly opted in via --try-rocm-path.

(cherry picked from commit 128d02e)
@github-actions github-actions Bot changed the title ROCgdb cherry picks from origin/amd-staging (2026-08-14) [amd-staging-rocgdb-18] ROCgdb cherry picks from origin/amd-staging (2026-08-14) Aug 14, 2026
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.

3 participants