feat(rocm): add gfx908 (MI100) and gfx90a (MI210) GPU support#2092
Open
kenvandine wants to merge 3 commits into
Open
feat(rocm): add gfx908 (MI100) and gfx90a (MI210) GPU support#2092kenvandine wants to merge 3 commits into
kenvandine wants to merge 3 commits into
Conversation
Adds AMD Instinct MI100 (CDNA1/gfx908) and MI200/MI210 (CDNA2/gfx90a) to the lemonade backend, following the llamacpp-rocm nightly build support added in lemonade-sdk/llamacpp-rocm#103. - Add gfx908 and gfx90a to ROCM_ARCH_MAPPING with both the direct arch string (used via HSA/WSL path) and the KFD-computed variants (gfx9008, gfx9010) produced by the native Linux digit-only parsing path - Extend the gfx arch regex from \d{4} to [0-9a-f]{3,4} to match 3-char and alphanumeric arch strings like gfx908 and gfx90a - Add MI100/MI200/MI210/Arcturus/Aldebaran marketing name recognition as a fallback in identify_rocm_arch_from_name - Register gfx908 and gfx90a as supported families for llamacpp rocm and sd-cpp rocm backends - Add human-readable device family names for both new architectures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
superm1
reviewed
Jun 4, 2026
| // Empty string means "no ROCm binary for this ISA" — skip for get_rocm_arch / install filenames. | ||
| const std::map<std::string, std::string> ROCM_ARCH_MAPPING = { | ||
| // CDNA1 - AMD Instinct MI100 (Arcturus) | ||
| {"gfx908", "gfx908"}, // Direct arch string (from HSA/WSL path) |
superm1
reviewed
Jun 4, 2026
| {"gfx9008", "gfx908"}, // KFD-computed string on native Linux (90008 → gfx9008) | ||
|
|
||
| // CDNA2 - AMD Instinct MI200/MI210 (Aldebaran) | ||
| {"gfx90a", "gfx90a"}, // Direct arch string (from HSA/WSL path) |
superm1
reviewed
Jun 4, 2026
Comment on lines
+1908
to
+1920
| // CDNA1 GPUs (gfx908 architecture) - AMD Instinct MI100 | ||
| if (device_lower.find("mi100") != std::string::npos || | ||
| device_lower.find("arcturus") != std::string::npos) { | ||
| return "gfx908"; | ||
| } | ||
|
|
||
| // CDNA2 GPUs (gfx90a architecture) - AMD Instinct MI200/MI210 | ||
| if (device_lower.find("mi200") != std::string::npos || | ||
| device_lower.find("mi210") != std::string::npos || | ||
| device_lower.find("aldebaran") != std::string::npos) { | ||
| return "gfx90a"; | ||
| } | ||
|
|
superm1
reviewed
Jun 4, 2026
Member
superm1
left a comment
There was a problem hiding this comment.
don't you need lemonade/llama.cpp too?
Member
Author
Member
|
That's for openvino though. We need rocm change. |
Member
Author
Sorry, crossed the streams there. Our llama.cpp already includes these in the gpu_targets. |
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.
Summary
Adds AMD Instinct MI100 (CDNA1/gfx908) and MI200/MI210 (CDNA2/gfx90a) to the lemonade backend, following llamacpp-rocm nightly build support added in lemonade-sdk/llamacpp-rocm#103.
gfx908andgfx90atoROCM_ARCH_MAPPINGwith both the direct arch string (used via HSA/WSL path) and KFD-computed variants (gfx9008,gfx9010) produced by the native Linux digit-only parsing path\d{4}to[0-9a-f]{3,4}to match 3-char and alphanumeric arch strings likegfx908andgfx90aidentify_rocm_arch_from_namegfx908andgfx90aas supported families forllamacpp rocmandsd-cpp rocmbackendsDependencies
Feature request
Test plan
lemonade backendsreportsrocmas supported on a system with an AMD Instinct MI100 (gfx908)lemonade backendsreportsrocmas supported on a system with an AMD Instinct MI200/MI210 (gfx90a)lemonade pull+lemonade runworks end-to-end with a model on both GPU targets once llamacpp-rocm#103 builds land🤖 Generated with Claude Code