From 63597f9899628d1b86f4406f4bbf442ec64f4568 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Tue, 21 Jul 2026 06:02:24 -0500 Subject: [PATCH] kmd_driver_t: reject Windows multi-GPU configuration at attach time Multi-GPU configurations on Windows are a documented known limitation of the HIP SDK Debugger. Rather than crash mid-session with an opaque fatal_error_t, detect the unsupported topology at the earliest opportunity (check_version(), called before enable_debug() and any GPU interaction) and return AMD_DBGAPI_STATUS_ERROR_RESTRICTION with a clear diagnostic. ROCgdb already handles ERROR_RESTRICTION gracefully: it emits a warning and continues with CPU-only debugging. Fixes: ROCM-9233 Signed-off-by: Claudiu Zissulescu --- projects/rocdbgapi/src/os_driver_kmd.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/rocdbgapi/src/os_driver_kmd.cpp b/projects/rocdbgapi/src/os_driver_kmd.cpp index 507377032c63..b0d31e747193 100644 --- a/projects/rocdbgapi/src/os_driver_kmd.cpp +++ b/projects/rocdbgapi/src/os_driver_kmd.cpp @@ -1323,6 +1323,15 @@ kmd_driver_t::check_version () const } } + /* Multi-GPU configurations are not supported on Windows. */ + if (m_agents.size () > 1) + { + warning ("GPU debugging on Windows supports only a single AMD GPU " + "debug agent; %zu agents were detected. GPU debugging will " + "not be available.", m_agents.size ()); + return AMD_DBGAPI_STATUS_ERROR_RESTRICTION; + } + return AMD_DBGAPI_STATUS_SUCCESS; }