@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / f44d1ddc8c
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 7, 10:15 UTC

[BugFix] Fix cmake based incremental install (wrong vllm install dir) (#35773)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>

Lucas Wilkinson committed Mar 3, 2026 at 00:58 UTC f44d1ddc8cf71e9d48fd9aa6633341fa11f395f9
1 file changed +8 -12
cmake/external_projects/vllm_flash_attn.cmake
+8 -12
@@ -46,24 +46,20 @@ else()
46 )
47 endif()
48
49 -
50 -# Install rules for FA components need the install prefix nested under vllm/
51 -# These run at install time, before the FA library's own install rules
52 -foreach(_FA_COMPONENT _vllm_fa2_C _vllm_fa3_C)
53 - install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY FALSE)" COMPONENT ${_FA_COMPONENT})
54 - install(CODE "set(OLD_CMAKE_INSTALL_PREFIX \"\${CMAKE_INSTALL_PREFIX}\")" COMPONENT ${_FA_COMPONENT})
55 - install(CODE "set(CMAKE_INSTALL_PREFIX \"\${CMAKE_INSTALL_PREFIX}/vllm/\")" COMPONENT ${_FA_COMPONENT})
56 -endforeach()
49 +# Make sure vllm-flash-attn install rules are nested under vllm/
50 +# ALL_COMPONENTS ensures the save/modify/restore runs exactly once regardless
51 +# of how many components are being installed, avoiding double-append of /vllm/.
52 +install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY FALSE)" ALL_COMPONENTS)
53 +install(CODE "set(OLD_CMAKE_INSTALL_PREFIX \"\${CMAKE_INSTALL_PREFIX}\")" ALL_COMPONENTS)
54 +install(CODE "set(CMAKE_INSTALL_PREFIX \"\${CMAKE_INSTALL_PREFIX}/vllm/\")" ALL_COMPONENTS)
55
56 # Fetch the vllm-flash-attn library
57 FetchContent_MakeAvailable(vllm-flash-attn)
58 message(STATUS "vllm-flash-attn is available at ${vllm-flash-attn_SOURCE_DIR}")
59
60 # Restore the install prefix after FA's install rules
63 -foreach(_FA_COMPONENT _vllm_fa2_C _vllm_fa3_C)
64 - install(CODE "set(CMAKE_INSTALL_PREFIX \"\${OLD_CMAKE_INSTALL_PREFIX}\")" COMPONENT ${_FA_COMPONENT})
65 - install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY TRUE)" COMPONENT ${_FA_COMPONENT})
66 -endforeach()
61 +install(CODE "set(CMAKE_INSTALL_PREFIX \"\${OLD_CMAKE_INSTALL_PREFIX}\")" ALL_COMPONENTS)
62 +install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY TRUE)" ALL_COMPONENTS)
63
64 # Install shared Python files for both FA2 and FA3 components
65 foreach(_FA_COMPONENT _vllm_fa2_C _vllm_fa3_C)