Skip to content

[comgr][hotswap] Bound symbol-less return inference memory - #9

Draft
harsh-amd wants to merge 1 commit into
users/harsh/hotswap-split-ref-04b-finite-fixedpointfrom
users/harsh/hotswap-split-ref-04-finite-cf
Draft

[comgr][hotswap] Bound symbol-less return inference memory#9
harsh-amd wants to merge 1 commit into
users/harsh/hotswap-split-ref-04b-finite-fixedpointfrom
users/harsh/hotswap-split-ref-04-finite-cf

Conversation

@harsh-amd

@harsh-amd harsh-amd commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Scope

Bound symbol-less return-region inference memory while preserving the fixed-point control-flow result and fail-closed behavior.

Stack

One-commit clean reference split from ROCm#3598, stacked on the finite fixed-point split. ROCm#3598 remains unchanged and ROCm#3576/ROCm#3577/ROCm#3583 are below the stack base.

Validation provenance

The exact commit is an ancestor of corpus-tested ab3cdd6. Its historical stage completed all 2,685 paths with zero success-to-failure regressions; the final cumulative result was 2,685/2,685.

Before upstream promotion

  • rebase onto the reviewed finite-control-flow API
  • apply standalone clang-format
  • run memory/scalability units, focused lit, and the full corpus

@harsh-amd harsh-amd changed the title [comgr][hotswap] Prove finite indirect control flow [comgr][hotswap] Bound symbol-less return inference memory Jul 25, 2026
@harsh-amd
harsh-amd changed the base branch from users/harsh/hotswap-split-ref-index-reconciled to users/harsh/hotswap-split-ref-04b-finite-fixedpoint July 25, 2026 20:30
SourishW pushed a commit that referenced this pull request Jul 28, 2026
## Scope

Add the fail-closed register-liveness primitive needed to reuse scratch
registers safely in later far-return routing changes. The proof:

- recognizes explicit, implicit, and tied read/modify/write operands;
- determines whether a replacement consumes an incoming register value
before
  overwriting it;
- synchronously decodes the owning function from the current `.text`
bytes so
  earlier patch writes cannot make a cached decode snapshot stale; and
- rejects undecodable instructions, invalid boundaries, escaping
successors,
  calls, returns, and unresolved control flow.

This first replacement is based directly on current `amd-staging`; later
replacement PRs will depend on its exact head. It establishes the
liveness
prerequisite but does not activate a new corpus rewrite by itself.

## Review fixes

The review repair commit `eada1e3b9041`:

- makes deferred trampoline mutations visible to current-text liveness;
- treats `s_rfe_i64` as terminating control flow;
- preserves and rejects MC `SoftFail` in safety proofs;
- fails closed on liveness proof gaps and bounds errors;
- invalidates liveness after specialized in-place VOP3PX2 writes; and
- adds focused unit coverage for the repaired paths.

The branch was then merged with the current target in `065af42b4b0a`.

## Validation

Exact head: `065af42b4b0ae8764b19be22d8d4b6176aeb2b99`

Exact corpus baseline: `39f443516c145f27e2255a41a232d565c9acb409`

All qualification checkouts and builds were created on `mi300x`.

- Release `HotswapMCTests`: 143/143 passed
- Release HotSwap LIT: 125/125 passed
- Release supported COMGR LIT: 148/148 passed, 14 unsupported
- Release COMGR CTest: 31/31 passed
- ASAN `HotswapMCTests`: 143/143 passed
- ASAN supported COMGR LIT: 148/148 passed, 14 unsupported
- ASAN COMGR CTest: 31/31 passed
- ASAN/LSAN reports: 0
- `clang-format`, `git diff --check`, focused review, and two
independent
  sibling reviews: clean

## Corpus qualification status

Both exact baseline and candidate runs evaluated the same 2,685 paths
with the
audited four-gate harness, four workers, 1,800-second rewrite timeouts,
and no
exclusions:

| Variant | Success | Failure | Timeout |
| --- | ---: | ---: | ---: |
| baseline | 2,558 | 127 | 0 |
| candidate | 2,558 | 127 | 0 |

- Corpus safety gate: **PASS** — zero new failures and zero worsened
retained
  failures.
- Corpus improvement gate: **FAIL** — zero baseline-failure-to-success
  improvements and no strict reduction in the failing set.

The failed improvement gate remains a blocker to an independent
`QUALIFIED`
verdict, but under the revised qualification procedure it does not stop
MI400-3 functional testing.

## MI400-3 qualification status

The complete original-library baseline and isolated candidate matrix is
complete
on the current Confluence image. Because the original-library sparse
suites
aborted, the authoritative candidate matrix was rerun in a second fresh
container as required by the qualification procedure.

Candidate library SHA-256:
`960b67ac1ceb80b74d325730d548171efec6c2c75196d16ae664b24c05792663`

| Required test set | Original library | Candidate |
| --- | ---: | ---: |
| HIP named cases | 24/24 pass | 24/24 pass |
| hipTensor quick | 57/57 pass | 57/57 pass |
| rocPRIM quick | 178/178 pass | 177/178 pass |
| rocThrust quick | 336/336 pass | 336/336 pass |
| hipSPARSE quick | 0/4 pass | 0/4 pass |
| rocSPARSE quick | 0/4 pass | 0/4 pass |
| rocSOLVER quick | 2/2 pass | 2/2 pass |
| hipBLASLt quick | 1/1 pass | 1/1 pass |
| rocThrust test 64 | 1/1 pass | 1/1 pass |

The selected quick counts reflect the current procedure: hipTensor uses
the
exact `^quick$` label; rocPRIM, rocThrust, and the remaining suites use
the
current `quick` selection, including `ffm-quick` where applicable.

Blocking MI400-3 findings:

- Candidate rocPRIM test ROCm#204, `test_device_partition_gpus_quick_suite`,
timed out at 300.11 seconds in the isolated full matrix. A focused fresh
A/B subsequently passed with both the original library (92 seconds) and
the
  exact candidate (94 seconds), so the timeout was not reproducibly
  candidate-specific; the recorded required-matrix timeout still blocks.
- All four hipSPARSE and all four rocSPARSE candidate tests aborted with
`HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION`, matching the
original-library
failing cases and failure class. hipSPARSE test #9 took about 228
seconds
  with the candidate versus 3.5 seconds in the original baseline.
- The GPU continued to enumerate as gfx1250 after the complete matrix;
no GPU
  reset or device loss occurred.

MI400-3 therefore **FAILS** its required pass gate. Together with the
failed
corpus improvement gate, PR ROCm#3618 is **NOT QUALIFIED** independently.
The
corpus safety gate remains PASS: no new or worsened corpus failures.

---------

Co-authored-by: Paul-Zhang <31449988+paulzzy@users.noreply.github.com>
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.

1 participant