From 40fb7daaa22d960d94748612ddb59d3084a5648c Mon Sep 17 00:00:00 2001 From: xintin Date: Tue, 23 Jun 2026 22:27:27 +0000 Subject: [PATCH] [hotswap][clr] Restrict HotSwap forwarding to validated source/target pairs HotSwap foreign-ISA forwarding in FatBinaryInfo::ExtractFatBinaryUsingCOMGR is gated by amd::hotswap::kSupportedPairs: a (source -> device target) pair must be listed for a foreign source bundle to be forwarded to the HSA loader for transpilation. The forwarding branch is intentionally evaluated before the native/generic branches, so any listed target is routed through the comgr hotswap tool when the tool is loaded (HSA_TOOLS_LIB names libamd_comgr_hotswap_tool.so). Until per-target transpilation is validated, restrict kSupportedPairs to gfx1250 -> gfx1250 (B0 -> A0) only. With gfx942 and gfx950 removed from the allowlist, fatbins built for those devices keep using their native code objects instead of being force-transpiled from a gfx1250 source bundle -- which was crashing a large fraction of HIP workloads on gfx942. gfx942 and gfx950 will be re-added as their transpilation paths are validated. No selection-order or HIP_FORCE_SPIRV_CODEOBJECT changes; the no-tool path is unchanged. Validated on gfx942 (MI300X): with the tool enabled, the full hip-tests catch suite shows zero new failures versus the no-tool baseline; remaining failures are pre-existing and reproduce without the tool. ISSUE ID: ROCm/rocm-systems#7234 --- projects/clr/rocclr/device/hotswap.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/projects/clr/rocclr/device/hotswap.hpp b/projects/clr/rocclr/device/hotswap.hpp index 0c26aa2781c..09366a64848 100644 --- a/projects/clr/rocclr/device/hotswap.hpp +++ b/projects/clr/rocclr/device/hotswap.hpp @@ -43,8 +43,6 @@ struct SourceTargetPair { inline constexpr SourceTargetPair kSupportedPairs[] = { {"gfx1250", "gfx1250"}, - {"gfx1250", "gfx950"}, - {"gfx1250", "gfx942"}, }; // True if (source_gfx -> target_gfx) is a supported pair.