Skip to content

fix: normalize gfx arch tokens to family wildcards in identify_rocm_arch_from_name (#2319)#2598

Closed
bong-water-water-bong wants to merge 3 commits into
lemonade-sdk:mainfrom
bong-water-water-bong:fix/2319-rocm-family-detection
Closed

fix: normalize gfx arch tokens to family wildcards in identify_rocm_arch_from_name (#2319)#2598
bong-water-water-bong wants to merge 3 commits into
lemonade-sdk:mainfrom
bong-water-water-bong:fix/2319-rocm-family-detection

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Contributor

What

Map specific gfx arch tokens to their family wildcards where ROCm backend assets are published under the family name instead of per-arch. Specific archs that have their own published assets (gfx1150, gfx1151, gfx1152, gfx942, gfx90a, etc.) remain unchanged.

Why

identify_rocm_arch_from_name returns the exact gfx token (e.g. gfx1201, gfx1102) but ROCm backend assets are published under family wildcards (gfx120X, gfx110X). This mismatch means:

  • Backend asset URLs resolve incorrectly
  • Support matrix checks fail even for supported GPUs
  • Users get "unsupported GPU" errors on hardware that works fine

How

Adds a gfx_to_family_wildcard() helper that maps:

  • RDNA4: gfx1200/gfx1201gfx120X
  • RDNA3: gfx1100gfx1103gfx110X
  • RDNA2: gfx1030gfx1036gfx103X
  • All others: passed through unchanged

Called from both the regex match path and the KFD ISA path in identify_rocm_arch_from_name.

Tested

  • RDNA3 GPU (gfx1102 → gfx110X resolution)
  • Non-matching archs pass through unchanged

Fixes #2319

…rch_from_name (lemonade-sdk#2319)

identify_rocm_arch_from_name() had a regex at the top that matched raw
gfx#### tokens from GPU names/PnP IDs (e.g. gfx1201) and returned them
directly — before brand-name checks that map to family wildcards. For
RDNA GPUs, the ROCm KFD/HSA reports the exact arch, but published ROCm
backend assets and support matrix entries use family wildcards (gfx120X,
gfx110X, gfx103X), causing mismatches that surface as 'GPU Unsupported'.

Add gfx_to_family_wildcard() to normalize:
  - gfx1200, gfx1201 → gfx120X (RDNA4)
  - gfx1100..gfx1103 → gfx110X (RDNA3)
  - gfx1030..gfx1036 → gfx103X (RDNA2)

Apply in both the regex path (HSA agent names) and the KFD numeric path.
Specific archs with their own published assets (gfx1150, gfx1151, gfx1152,
gfx942) remain unchanged.

Fixes lemonade-sdk#2319
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Adds lemon-mlx backend support for Apple Silicon, AMD ROCm
(Strix Halo gfx1151), and CPU inference via lemon-mlx-engine.

- New C++ backend: mlx.h, mlx_server.h, mlx_server.cpp
- Register in CMakeLists.txt LEMON_BACKENDS
- Config: backend_versions, server_models (3 Qwen MLX models)
- UI: recipe options, recipe order, streaming fixes
- Clean integration from fl0rianr/add_mlx_lemon_backend
- Includes max_completion_tokens erase fix
@bong-water-water-bong

Copy link
Copy Markdown
Contributor Author

Split into two PRs:

PR #2598 was combining both. #2619 is the clean gfx arch fix rebased onto latest main.

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

Labels

bug Something isn't working engine::ryzenai RyzenAI hybrid NPU backend runtime::rocm AMD ROCm runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ROCm unavailable for gfx103X, gfx110X and gfx120X

1 participant