From 3956357f9c4e44ae2663985b61bf43ea2958b4f4 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sun, 13 Sep 2026 20:53:59 +0000 Subject: [PATCH] fix(MODEL-MM-QWEN4-EXP): guard ManagedAllocActive call with VLLM_CPP_HIP on non-ROCm builds Commit 054546bfe added a call to vt::rocm::ManagedAllocActive(0) at tests/vt/test_backend_cross_device.cpp:279. The function is declared in the HIP-free header include/vt/rocm/rocm_runtime.h:57 but defined only in src/vt/rocm/rocm_backend.hip:767. On non-ROCm builds the symbol is undefined and the linker fails, breaking build-test-cpu, build-newest-gcc, build-test-vulkan, and both sanitize-cpu jobs on main. The call sits inside a for (DeviceType dt : RegisteredDevices()) loop that continues on non-kROCM devices, so the code path never executes on a non-ROCm build. Guard the call with #if defined(VLLM_CPP_HIP) and fall back to false, matching the pattern the file already uses at line 3031 for the rest of its ROCm test code. Closes #3184 FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:glm5.2 [maki] --- tests/vt/test_backend_cross_device.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/vt/test_backend_cross_device.cpp b/tests/vt/test_backend_cross_device.cpp index 370b85efb..033c87091 100644 --- a/tests/vt/test_backend_cross_device.cpp +++ b/tests/vt/test_backend_cross_device.cpp @@ -276,7 +276,11 @@ TEST_CASE("a large pageable H2D takes the pinned bounce ring, and a small one do } } +#if defined(VLLM_CPP_HIP) const bool managed = vt::rocm::ManagedAllocActive(0); +#else + const bool managed = false; +#endif const vt::rocm::PinnedH2DStats before = vt::rocm::PinnedH2DSnapshot(); void* p = dev.Alloc(kBig);