Skip to content

Harden AMD gpu-omp CI coverage + lint against silent declare-target regressions (follow-up to #1588) #1589

Description

@sbryngelson

Follow-up to #1588 / #1587. The #1556 regression silently disabled viscosity on the AMD-flang gpu-omp build and was caught only by the 2D_viscous_shock_tube example, not the regression suite — because the AMD gpu-omp CI shards' coverage selection skipped the 2D -> Example -> * viscous tests (the "secondary question" in #1587). The suite is not short on viscous cases; the gap is test selection on the AMD lane, so simply adding more tests wouldn't help if they're skipped the same way.

Proposed hardening (each can be its own small PR):

  1. Always-run viscous-GPU canary. One fast 2-fluid viscous case marked non-skippable on the AMD gpu-omp lane, so any regression that silently disables viscosity (wrong Re, stale device state, etc.) trips immediately. Rides the existing is_always_run_all path in toolchain/mfc/test/coverage.py.

  2. Map GPU-state files to viscous tests in the coverage map. Changes to src/simulation/m_global_parameters.fpp, m_riemann_*, or anything carrying a GPU_DECLARE should force a viscous-GPU test — that's exactly the blast radius of Fix silent viscosity loss on AMD flang GPU (host-capture Re_size in the Riemann solvers) #1588.

  3. Precheck rule for static declare target arrays (optional). Fix silent viscosity loss on AMD flang GPU (host-capture Re_size in the Riemann solvers) #1588's root cause is that AMD flang does not unify a static (non-allocatable) declare target module array across translation units; Re_size was the last static one among the Re_* arrays. A lint_source.py rule flagging non-allocatable arrays under GPU_DECLARE (suggesting allocatable) would catch the next instance at commit time, before any CI.

Context: the underlying defect is an amdflang bug (ROCm/llvm-project#2890, llvm/llvm-project#203711), but it produces silent wrong answers, so CI coverage of the viscous-GPU path is the durable guard.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions