wsl/libhsakmt: set default node

Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/82>
Этот коммит содержится в:
Flora Cui authored and Frank Min committed 2025-11-05 18:53:36 +08:00
1 родитель b3c685585e
Коммит 67332944d2
3 files changed
+13 -1

No files matched your search

+8
Просмотреть файл
@@ -116,6 +116,14 @@ static HSAKMT_STATUS init_vars_from_env(void) {
if (envvar)
dxg_runtime->enable_thunk_sub_allocator = atoi(envvar);
envvar = getenv("ROCR_VISIBLE_DEVICES");
if (envvar) {
std::string devices(envvar);
size_t first_num_pos = devices.find_first_of("0123456789");
if (first_num_pos != std::string::npos)
dxg_runtime->default_node = std::stoi(devices.substr(first_num_pos)) + 1;
}
return HSAKMT_STATUS_SUCCESS;
}