Repository navigation
[HIP] [OPUS] [JIT] Hybrid pinning and ASIC-aware gfx1250 A0 COs - #6988
Conversation
Compile regular and gfx1250-strict images with LLVM amdgpu-pin-hybrid, preserve exact kids, and select the A0 profile by current-device ASIC Revision. Validate ELF identity and pin placement, isolate registrations by device/path, and add native HIP and cache regression coverage. Document the successful A0 smoke and incomplete full-repeat stability validation.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
Sort test imports, document the controlled trusted-AST execution using the existing test convention, and format the changed Python files with Black. Keep CO artifacts and runtime behavior unchanged.
#6988 (merged) added A0 strict Opus code objects under gen_co/gfx1250-a0/, selected by ASIC revision and validated by ELF mach id. Its refactor also reintroduced many exact 'gfx1250' runtime-dispatch checks. Rather than sweep every call site, collapse gfx1250-strict -> gfx1250 at the single runtime detection source (_detect_native): A0 and B0 select the same kernel family, and B0-only artifacts are rejected on A0 by the asicRevision asm gate and the Opus mach-0xeb check, not by the dispatch name. Build-time (GPU_ARCHS=gfx1250-strict) and AOT replay keep the strict identity, so the asm gate and strict codegen are unaffected. Conflicts (fmha_kernels, gemm_op_a8w8, pa_sparse_prefill_opus) resolved to main's refactor; the normalization covers strict there. Plan workstream-2 updated to reflect #6988. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Resolve chip_info.py: keep the get_gfx_runtime.cache_clear shim and main's _parse_asic_revision (ROCm#6988) side by side - get_asic_revision() still reads rocminfo/hipinfo agents; a missing tool now yields no agents and it raises as before
Summary
amdgpu_pin_vgprattributes with SSA copy-out, preserving exact kid/symbol identities and the 64-byte launch ABI.yuyzhang512/llvm-projectamdgpu-pin-hybrid@352c37bad3561fc0f23163d5b1419910213d26bb, and add 221 independent A0--offload-arch=gfx1250-strictimages undercsrc/opus_gemm/gen_co/gfx1250-a0/. The previousnamed_reg/gfx1250/explicit path mirrors the rebuilt regular images.0-> A0 strict,1+-> regular), rather than a node-wide stepping minimum or rocminfo agent ordinal. Cache registrations by device plus resolved absolute image path; remove the generated launcher's first-device static reference.0xebstrict vs0x49regular), reject missing/wrong profiles without cross-profile fallback, and roll back failed registrations before image buffers are released.Validation
Recorded during development:
rocm/dev-ubuntu-24.04:10.1.0-fullimage on g21-10, the native A0 smoke completed for 3 family representatives / 6 CPU-golden cases, including batch=2, tiny K, ragged M/N/K and row padding. Maximum absolute error was 0 for these cases. Runtime ASIC Revision was 0 and the real strict ELF was loaded without changing its processor flag.Known A0 validation limitation - not a full correctness certification
The subsequent all-variant native rerun did not complete: it stopped making progress on kid 21316,
257x257x257, batch=2, pad=8, after loading the kernel. The same case had passed in the initial smoke. The test exceeded its bounded window and its worker did not exit after termination requests; no shared GPU reset was attempted.Therefore this PR does not claim all-221 A0 numerical/stability certification or a performance improvement. A0 repeat-run behavior still needs investigation before treating the strict profile as fully validated for production. Earlier Torch/GPU-input validation attempts also encountered runtime/device-query stalls and are not counted as passing.
HIP
7.16.26385was confirmed to load the strict ELF; HIP7.15.26333rejected it withhipErrorNoBinaryForGpu.See the hybrid validation report and dev-image launch report for exact compiler/image identities, reproduction commands and the validation boundaries. The older std-branch experiment is explicitly marked historical.