flashinfer-ai / flashinfer

FlashInfer: Kernel Library for LLM Serving
https://flashinfer.ai
Apache License 2.0
760 stars 64 forks source link

[CMake][Bugfix] Set default value for FLASHINFER_GEN_MASK_MODES #340

Closed Lunderberg closed 6 days ago

Lunderberg commented 1 week ago

This commit resolves a build-time error with the following message:

CMake Error at 3rdparty/flashinfer/CMakeLists.txt:313 (add_library):
  No SOURCES given to target: prefill_kernels

This occurred after https://github.com/flashinfer-ai/flashinfer/pull/266, which replaces the FLASHINFER_GEN_CASUALS option with FLASHINFER_GEN_MASK_MODES. However, the definition of flashinfer_option(FLASHINFER_GEN_CASUALS ... ) was not replaced. As a result, loop over the empty MASK_MODES does not produce any kernels that should be compiled.

This commit updates the flashinfer_option(FLASH_GEN_CASUALS ...) line to instead define FLASH_GEN_MASK_MODES, using the same default value as config.cmake.