Skip to content

Commit 6435939

Browse files
committed
Cleanup, fix ROCm build
1 parent d89987f commit 6435939

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

CMakeLists.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ endif()
285285

286286
message(STATUS "Enabling C extension.")
287287
define_gpu_extension_target(
288-
_C
289-
DESTINATION vllm
290-
LANGUAGE ${VLLM_GPU_LANG}
291-
SOURCES ${VLLM_EXT_SRC}
292-
COMPILE_FLAGS ${VLLM_GPU_FLAGS}
293-
ARCHITECTURES ${VLLM_GPU_ARCHES}
294-
INCLUDE_DIRECTORIES ${CUTLASS_INCLUDE_DIR}
295-
USE_SABI 3
296-
WITH_SOABI)
288+
_C
289+
DESTINATION vllm
290+
LANGUAGE ${VLLM_GPU_LANG}
291+
SOURCES ${VLLM_EXT_SRC}
292+
COMPILE_FLAGS ${VLLM_GPU_FLAGS}
293+
ARCHITECTURES ${VLLM_GPU_ARCHES}
294+
INCLUDE_DIRECTORIES ${CUTLASS_INCLUDE_DIR}
295+
USE_SABI 3
296+
WITH_SOABI)
297297

298298
# If CUTLASS is compiled on NVCC >= 12.5, it by default uses
299299
# cudaGetDriverEntryPointByVersion as a wrapper to avoid directly calling the
@@ -325,11 +325,6 @@ define_gpu_extension_target(
325325
USE_SABI 3
326326
WITH_SOABI)
327327

328-
# vllm-flash-attn currently only supported on CUDA
329-
if (NOT VLLM_TARGET_DEVICE STREQUAL "cuda")
330-
return()
331-
endif ()
332-
333328
if(VLLM_GPU_LANG STREQUAL "HIP")
334329
#
335330
# _rocm_C extension
@@ -349,6 +344,11 @@ if(VLLM_GPU_LANG STREQUAL "HIP")
349344
WITH_SOABI)
350345
endif()
351346

347+
# vllm-flash-attn currently only supported on CUDA
348+
if (NOT VLLM_TARGET_DEVICE STREQUAL "cuda")
349+
return()
350+
endif ()
351+
352352
#
353353
# Build vLLM flash attention from source
354354
#
@@ -357,7 +357,7 @@ endif()
357357
# They should be identical but if they aren't, this is a massive footgun.
358358
#
359359
# The vllm-flash-attn install rules are nested under vllm to make sure the library gets installed in the correct place.
360-
# To only install vllm-flash-attn, use --component vllm-flash-attn_c.
360+
# To only install vllm-flash-attn, use --component vllm_flash_attn_c.
361361
# If no component is specified, vllm-flash-attn is still installed.
362362

363363
# If VLLM_FLASH_ATTN_SRC_DIR is set, vllm-flash-attn is installed from that directory instead of downloading.

0 commit comments

Comments
 (0)