Skip to content

fix(surface): remove shared CUDA literals from device selection - #138

Closed
localai-bot wants to merge 2 commits into
mainfrom
row/ARCH-ONE-SURFACE-DEVICE-LEAKAGE
Closed

fix(surface): remove shared CUDA literals from device selection#138
localai-bot wants to merge 2 commits into
mainfrom
row/ARCH-ONE-SURFACE-DEVICE-LEAKAGE

Conversation

@localai-bot

@localai-bot localai-bot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Scope

Repair the inherited PR #136 device-leakage regression through the platform/backend abstraction. ABI-v14 remains 0=auto, 1=cpu, 2=cuda; public names and loud absent-CUDA failure are unchanged. H3 source is untouched.

Architecture

  • ABI slot 2 is represented internally as Device::kNamedPlatform.
  • DeviceName() remains the canonical public spelling (cuda).
  • FindPlatformByName resolves that name through the platform registry.
  • Shared loading propagates the registry's DeviceType; it does not branch on CUDA.

The resolver test supplies kXPU and requires kXPU back, so a hidden hardcoded CUDA return is mutation-sensitive.

RED / GREEN

  • RED on main b44ad337: kcuda=7, total DSR 39 vs baseline 32.
  • RED-first focused compile: missing neutral enum, registry lookup, and optional resolved-type signature.
  • GREEN: DSR 32 (kcuda=0) with baseline/allowlist unchanged.
  • GREEN: leakage checker mutation suite 25/25.
  • CPU Release, CUDA OFF, -Werror:
    • test_platform: 11/11 cases, 85 assertions.
    • test_loaded_engine_dense: 9/9 cases, 65 assertions.
    • test_capi: 45/45 cases, 428 assertions.
  • Staged preflight: all gates green.

No CUDA runtime, model download, service change, benchmark, or release artifact. The existing CUDA-build A/B remains a named residual.

Exact reviewed head: 285987a6c83d4f93b0698d2041851588f12b3bd4.

FOLLOWING_AGENTS_PROTOCOL

mudler added 2 commits August 8, 2026 01:37
Materialize the isolated ARCH-ONE-SURFACE helper claim and record the inherited PR #136 DSR regression as a pending correctness-only checkpoint.

FOLLOWING_AGENTS_PROTOCOL

Assisted-by: Codex:gpt-5 [Codex]
Preserve ABI-v14 device values and public names while removing shared CUDA literals from device selection. Resolve the canonical device name through the platform registry and propagate its DeviceType, with mutation-sensitive CPU gates.

FOLLOWING_AGENTS_PROTOCOL

Assisted-by: Codex:gpt-5 [Codex]
@localai-bot

Copy link
Copy Markdown
Collaborator Author

Superseded by #139. This PR's feature commit omitted the required helper row/PR reference in its commit message, so it was not rewritten or force-pushed. The tested change was replayed from current main on the clean replacement row branch with protocol-compliant metadata.

@localai-bot localai-bot closed this Aug 8, 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.

2 participants