rocminfo: early detect absence of unsupported GPU in wsl (#1317)

Add an early check in WSL to detect when no supported GPU is available.
otherwise rocm_agent_enumerator will keep retrying rocminfo for one
minute, causing unnecessary delay.

Signed-off-by: Flora Cui <flora.cui@amd.com>
Co-authored-by: harkgill-amd <harkgill@amd.com>
Этот коммит содержится в:
Flora Cui
2025-10-21 11:15:44 +08:00
коммит произвёл GitHub
родитель 4cca398b56
Коммит a433e6f48d
+5
Просмотреть файл
@@ -1321,6 +1321,11 @@ int main() {
return 1;
}
err = hsa_init();
if (wsl_env && (err != HSA_STATUS_SUCCESS)) {
printf("%shsa_init Failed, possibly no supported GPU devices%s\n",
COL_RED, COL_RESET);
return 1;
}
RET_IF_HSA_ERR(err)
// Acquire and display system information