Skip to content

Commit

Permalink
Fix CMake build (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
ur4t authored Dec 18, 2024
1 parent 2bc3214 commit caeb3d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,17 @@ file(GLOB_RECURSE DECODE_KERNELS_SRCS
${PROJECT_SOURCE_DIR}/src/generated/*decode_head*.cu)
file(GLOB_RECURSE PREFILL_KERNELS_SRCS
${PROJECT_SOURCE_DIR}/src/generated/*prefill_head*.cu)
file(GLOB_RECURSE DISPATCH_INC_FILE
${PROJECT_SOURCE_DIR}/src/generated/dispatch.inc)

add_custom_command(
OUTPUT ${DECODE_KERNELS_SRCS} ${PREFILL_KERNELS_SRCS}
OUTPUT ${DECODE_KERNELS_SRCS} ${PREFILL_KERNELS_SRCS} ${DISPATCH_INC_FILE}
COMMAND ${AOT_GENERATE_COMMAND}
DEPENDS ${FLASHINFER_GENERATORS}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generating kernel sources"
VERBATIM)
add_custom_target(dispatch_inc DEPENDS ${DISPATCH_INC_FILE})

add_library(decode_kernels STATIC ${DECODE_KERNELS_SRCS})
target_include_directories(decode_kernels PRIVATE ${FLASHINFER_INCLUDE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <random>
#include <sstream>

#include "dispatch.inc"
#include "generated/dispatch.inc"
#include "flashinfer/exception.h"

#define _DISPATCH_SWITCH(var_name, cond, ...) \
Expand Down

0 comments on commit caeb3d3

Please sign in to comment.