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
Closed
Conversation
…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
|
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
Contributor
Author
|
Split into two PRs:
PR #2598 was combining both. #2619 is the clean gfx arch fix rebased onto latest main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_namereturns the exact gfx token (e.g.gfx1201,gfx1102) but ROCm backend assets are published under family wildcards (gfx120X,gfx110X). This mismatch means:How
Adds a
gfx_to_family_wildcard()helper that maps:gfx1200/gfx1201→gfx120Xgfx1100–gfx1103→gfx110Xgfx1030–gfx1036→gfx103XCalled from both the regex match path and the KFD ISA path in
identify_rocm_arch_from_name.Tested
Fixes #2319