Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake build #678

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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