diff --git a/CMakeLists.txt b/CMakeLists.txt index 529ce29029b2..ea56b8451f22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -768,6 +768,14 @@ if(VLLM_GPU_LANG STREQUAL "CUDA") list(APPEND VLLM_MOE_EXT_SRC "csrc/moe/moe_wna16.cu") endif() +if(VLLM_GPU_LANG STREQUAL "CUDA") + set(MOE_PERMUTE_SRC + "csrc/moe/permute_unpermute_kernels/moe_permute_unpermute_kernel.cu" + "csrc/moe/moe_permute_unpermute_op.cu") + + list(APPEND VLLM_MOE_EXT_SRC "${MOE_PERMUTE_SRC}") +endif() + set_gencode_flags_for_srcs( SRCS "${VLLM_MOE_EXT_SRC}" CUDA_ARCHS "${CUDA_ARCHS}") @@ -836,17 +844,6 @@ if(VLLM_GPU_LANG STREQUAL "CUDA") endif() endif() -if(VLLM_GPU_LANG STREQUAL "CUDA") - set(MOE_PERMUTE_SRC - "csrc/moe/permute_unpermute_kernels/moe_permute_unpermute_kernel.cu" - "csrc/moe/moe_permute_unpermute_op.cu") - - set_gencode_flags_for_srcs( - SRCS "${MOE_PERMUTE_SRC}" - CUDA_ARCHS "${CUDA_ARCHS}") - - list(APPEND VLLM_MOE_EXT_SRC "${MOE_PERMUTE_SRC}") -endif() message(STATUS "Enabling moe extension.") define_gpu_extension_target( _moe_C