fix: enable TheRock ROCm installation on Windows for Radeon RX GPUs#2093
fix: enable TheRock ROCm installation on Windows for Radeon RX GPUs#2093anditherobot wants to merge 8 commits into
Conversation
…k#2050) Allows Lemonade to automatically detect and download ROCm graphics acceleration files for AMD Radeon gaming graphics cards (RX 5000, 6000, 7000, and 9000 series) on Windows. Previously, these cards were recognized as unsupported, forcing the server to run text and image models on the slower CPU or Vulkan fallbacks.
superm1
left a comment
There was a problem hiding this comment.
I think this needs more matches for Linux too or this will cause an issue when a Linux user tries.
|
Good catch. I originally focused on Windows (from the original issue), but you're right that Linux needs this LMK if this looks good. |
| // RDNA1 family. Linux KFD reports the exact GPU ISA (gfx1010/gfx1011/gfx1012), | ||
| // while Lemonade recipes and ROCm backend downloads use the shared family name gfx101X. | ||
| {"gfx1010", "gfx101X"}, // Navi 10 (e.g., RX 5700 / 5700 XT) | ||
| {"gfx1011", "gfx101X"}, // Navi 12 (e.g., Radeon Pro 5600M) | ||
| {"gfx1012", "gfx101X"}, // Navi 14 (e.g., RX 5500 / 5500 XT) | ||
|
|
There was a problem hiding this comment.
you're adding these, but the mappings you added also had more (103x, 110x, 120x). Either add them all here or drop the mapping from backend_versions.json
| }}, | ||
| {"llamacpp", "rocm", {"windows", "linux"}, { | ||
| {"amd_gpu", {"gfx1150", "gfx1151", "gfx103X", "gfx110X", "gfx120X"}}, // STX iGPUs + RDNA2/3/4 dGPUs | ||
| {"amd_gpu", {"gfx101X", "gfx1150", "gfx1151", "gfx103X", "gfx110X", "gfx120X"}}, // STX iGPUs + RDNA1/2/3/4 dGPUs |
There was a problem hiding this comment.
same comment as above, missing more mappings
Keep Linux ROCm detection consistent with the backend package mappings by normalizing gfx1033, gfx1035, and gfx1036 to gfx103X. Update the ROCm mapping test to cover the same behavior.
|
Thanks, this clarified the missing layer. Linux raw I added Mapping for the codes covered by this PR:
Does this cover the layer mismatch you were pointing at, or am I still missing a case? |
|
All of the targets and how they map are described here: https://github.com/ROCm/TheRock/blob/main/cmake/therock_amdgpu_targets.cmake You can cross reference this. |
Completes RDNA3.5 mappings in backend versions and system detection, following ROCm's therock_amdgpu_targets.cmake target definitions.
|
Thanks for the reference! I cross-referenced I hope that this fully covers the RDNA3.5 family. Here is the updated mapping table:
|
| }}, | ||
| {"llamacpp", "rocm", {"windows", "linux"}, { | ||
| {"amd_gpu", {"gfx1150", "gfx1151", "gfx103X", "gfx110X", "gfx120X"}}, // STX iGPUs + RDNA2/3/4 dGPUs | ||
| {"amd_gpu", {"gfx101X", "gfx1150", "gfx1151", "gfx1152", "gfx1153", "gfx103X", "gfx110X", "gfx120X"}}, // STX iGPUs + RDNA1/2/3/4 dGPUs |
There was a problem hiding this comment.
You should just drop the comments. This is never going to age well. You also added things like Phoenix, hawk point here.
7e9af8a to
1d9c021
Compare
| 13. **Desktop app is on-demand; `lemond` runs independently** — On Windows, `LemonadeServer.exe` (which embeds `lemond` + tray icon) is the always-on process, auto-started via the Windows startup folder. The Tauri desktop app (`lemonade-app.exe`) is opened on demand when the user wants the UI and must not be added to startup. The desktop app must not embed or manage `lemond`'s lifecycle — it discovers the already-running server (UDP beacon for local, explicit base URL for remote) and speaks to it over HTTP. | ||
| 14. **AMD GPU platform parity** — When adding or expanding AMD/ROCm GPU support, keep Windows and Linux detection in sync. Windows commonly detects GPUs from product names like `5700` or `6800`, while Linux may report raw KFD ISA codes like `gfx1010` or `gfx1030`. Update `ROCM_ARCH_MAPPING` in `system_info.cpp` as needed so Linux detections resolve to the backend target expected by recipes and ROCm downloads, or to `""` when that ISA is intentionally unsupported. | ||
|
|
||
| ## Pending Local Work |
| "gfx908", | ||
| "gfx90a", | ||
| "gfx942", | ||
| "gfx101X", |
There was a problem hiding this comment.
I don't think this is correct here
|
|
||
| std::string arch = lemon::SystemInfo::get_rocm_arch(); | ||
| if (arch == "gfx1151") { | ||
| if (arch == "gfx1151" || arch == "gfx1152") { |
There was a problem hiding this comment.
Fair point. I don't have a way to test if gfx1152 actually needs this memory size fix.
|
Hi @superm1, I did some homework From what I understand,
(Note: Generic I see two options to handle this:
What do you think of these approaches ? (Edit: Replaced range dashes "–" with "to" in the table to clarify that these represent ranges of separate decimal target values, not a hyphenated integer format). |
|
Option A is the correct approach. We rely upon AMD binaries, and if AMD doesn't publish them we should fall back to vulkan or CPU. |
HTH do you get 100100-02 from a 32 bit integer? This is impossible. https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/amd/amdkfd/kfd_topology.c#L472 |
The dash was meant as range shorthand, not as a literal kernel value: |
Ah Thanks for confirm |
fix: enable TheRock ROCm installation on Windows for Radeon RX GPUs (#2050)
Summary
Enables TheRock installation for Radeon RX GPUs when Lemonade detects the GPU by a family architecture code such as
gfx120X.In the reported Windows RX 9060 XT case, Lemonade correctly identifies the card as
gfx120X. That code means the RX 9000 / RDNA4 GPU family. However,backend_versions.jsondid not listgfx120X, so Lemonade skipped the TheRock install step.Change
Adds the Radeon RX family architecture codes to the TheRock install metadata:
gfx101Xgfx101X-dgpugfx103Xgfx103X-allgfx110Xgfx110X-allgfx120Xgfx120X-allAlso adds RX 5000 name detection so cards such as RX 5700 XT can resolve to
gfx101X.Testing
gfx120X.Fixes #2050