Skip to content

Commit 53d92db

Browse files
committed
Adjust URL mappings
1 parent b33c53f commit 53d92db

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

src/cpp/resources/backend_versions.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,26 @@
2222
"gfx908",
2323
"gfx90a",
2424
"gfx942",
25-
"gfx1030",
26-
"gfx1031",
27-
"gfx1032",
2825
"gfx1100",
2926
"gfx1101",
3027
"gfx1102",
3128
"gfx1151",
3229
"gfx1150",
3330
"gfx1200",
3431
"gfx1201"
35-
]
32+
],
33+
"url_mapping": {
34+
"gfx908": "gfx90X-dcgpu",
35+
"gfx90a": "gfx90X-dcgpu",
36+
"gfx942": "gfx94X-dcgpu",
37+
"gfx1100": "gfx110X-all",
38+
"gfx1101": "gfx110X-all",
39+
"gfx1102": "gfx110X-all",
40+
"gfx1151": "gfx1151",
41+
"gfx1150": "gfx1150",
42+
"gfx1200": "gfx120X-all",
43+
"gfx1201": "gfx120X-all"
44+
}
3645
},
3746
"ryzenai-server": "v1.7.0",
3847
"flm": {

src/cpp/server/backends/backend_utils.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,18 @@ namespace lemon::backends {
419419
// Create install directory
420420
fs::create_directories(install_dir);
421421

422-
// Build URL
423-
std::string filename = "therock-dist-linux-" + arch + "-" + version + ".tar.gz";
422+
// Get the URL variant for this architecture from config
423+
std::string config_path = utils::get_resource_path("resources/backend_versions.json");
424+
json config = utils::JsonUtils::load_from_file(config_path);
425+
426+
std::string url_variant = arch; // default to arch name
427+
if (config.contains("therock") && config["therock"].contains("url_mapping") &&
428+
config["therock"]["url_mapping"].contains(arch)) {
429+
url_variant = config["therock"]["url_mapping"][arch].get<std::string>();
430+
}
431+
432+
// Build URL with the correct variant
433+
std::string filename = "therock-dist-linux-" + url_variant + "-" + version + ".tar.gz";
424434
std::string url = "https://repo.amd.com/rocm/tarball/" + filename;
425435

426436
// Download to temp

0 commit comments

Comments
 (0)