Add support for ROCm channels (For llama.cpp and stable diffusion)#1460
Add support for ROCm channels (For llama.cpp and stable diffusion)#1460
Conversation
jeremyfowers
left a comment
There was a problem hiding this comment.
Gently blocking PR until policy questions are resolved.
6be002f to
03247c7
Compare
93eb1d1 to
c1de11b
Compare
f5422f8 to
9d20545
Compare
|
I've made adjustments.
This needs more testing that I didn't break anything. |
c93edd0 to
9ac5ff3
Compare
|
@claude review |
|
Claude finished @ramkrishna2910's task in 2m 43s —— View job PR Review: Add support for ROCm channelsTasks:
Overall, this is a substantial and well-structured PR that adds meaningful capability — three ROCm channels (stable/preview/nightly) for both llama.cpp and stable-diffusion.cpp. The core architecture is sound. I've found several bugs and code quality issues below, ranging from config documentation mismatches to hardcoded version strings. Bugs1.
{
"rocm_channel": "preview",
"llamacpp": { ... }
}But {
"llamacpp": {
"rocm_channel": "preview"
}
}The CLI command in the same doc ( 2. Windows sd-cpp stable filename has wrong ROCm version In params.filename = "sd-" + short_version + "-bin-win-rocm-7.1.1-x64.zip";But 3. Incorrect fallback in In // Falls through to llamacpp section even when recipe == "sd-cpp"
if (backend_versions.contains("llamacpp") &&
backend_versions["llamacpp"].contains(runtime_key) ...This means if sd-cpp's runtime key is missing, it would silently use llamacpp's runtime version — wrong and hard to debug. Fix this → 4. ROCm preview filenames hard-code In params.filename = "llama-" + version + "-bin-win-rocm-7.12-x64.zip";
params.filename = "llama-" + version + "-bin-ubuntu-rocm-7.12-x64.tar.gz";The TheRock version is already in Code Quality5. The pattern
This should be a single shared utility — e.g., 6. static const char* ROCM_STABLE_RUNTIME_DIR = "rocm-stable-runtime";Defined separately in 7. Indentation inconsistency in The #elif defined(__linux__)
if (resolved_backend == "rocm-stable") { // 4-space indent (correct)
...
} else {
...
}
...
} else {
// CPU build (default)
#ifdef _WIN32 // 4-space + `#ifdef` indent (wrong)The 8. The new Testing Gaps9. CI test ( The new CI job runs on
But it cannot actually test that the correct binary is downloaded, that the ROCm runtime is installed, or that inference works. The test is worth keeping for the config-layer validation, but the description should reflect what it actually tests. 10. No test for the The nightly channel has no CI coverage at all. At minimum, validating that Minor Notes
|
c74b23a to
9964ac8
Compare
Follow-up to the naming cleanup: align the lemon-mlx backend with the ROCm channel naming introduced by lemonade-sdk#1460 (rocm-stable / rocm-preview / rocm-nightly). The lemon-mlx-engine is built against TheRock, so "rocm-preview" is the appropriate channel. - backend_versions.json: "rocm" → "rocm-preview" - lemon_mlx_server.cpp: add resolve_lemon_mlx_backend() so the bare "rocm" alias still resolves to "rocm-preview" (keeps existing user configs working); reject unknown channels explicitly instead of silently building a bogus filename - get_install_params: channel-aware, scoped Linux-only error message to the specific channel that failed - get_lemon_mlx_server_path: looks up backend binary under the channel-qualified key, matching how other backends will find their channel-specific installs once lemonade-sdk#1460 lands This commit is forward-compatible with lemonade-sdk#1460. It does not yet consume TheRock helpers (get_therock_lib_path etc.) since those only live on superm1/multiple-rocm-backends so far — adding them will be a clean follow-up once the helpers exist on main.
720b19a to
30ec3aa
Compare
282d408 to
17d1ca3
Compare
jeremyfowers
left a comment
There was a problem hiding this comment.
Provided the policy/defaults I want to see offline. @ramkrishna2910 to provide thorough review.
Geramy
left a comment
There was a problem hiding this comment.
Looks good to me, I dont see any inefficiencies 100% optimal to me.
The ROCm stable runtime utilizes the AMD released stable ROCm runtime and the upstream llama.cpp artifacts. The ROCm preview runtime utlilizes artifacts built by lemonade daily
17d1ca3 to
93bfa74
Compare
The ROCm stable runtime utilizes the AMD released ROCm runtimes (stable and preview) and the upstream llama.cpp artifacts.