ref(upstream): FULL TREE — Deep-Spark xllm (1470) + ds_vllm csrc/models (703)
Replaces cherry-picked upstream_ref with complete source trees. xllm/ — Iluvatar official C++ inference engine (15MB, 1470 files) Complete: kernels → layers → models → runtime → scheduler → api Excluded: .git, binary images, third_party submodule checkouts ds_vllm/ — Iluvatar official vllm fork (8MB, 703 files) Included: csrc/ (ALL CUDA kernels), fused_moe/, qwen3_5 model, _custom_ops Excluded: tests, benchmarks, docs, examples (not needed for reference) Critical call chains now fully traceable: MoE: moe_topk_softmax_kernels.cuh → ixformer.h → fused_moe.cpp → layer GDN: qwen3_gated_delta_net_base.cpp → qwen3_5_gated_delta_net.cpp Attention: ixformer.h → xllm_paged_attention → attention.cpp
This commit is contained in:
60
upstream_ref/xllm/cmake/cc_binary.cmake
Normal file
60
upstream_ref/xllm/cmake/cc_binary.cmake
Normal file
@@ -0,0 +1,60 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# inspired by https://github.com/abseil/abseil-cpp
|
||||
# cc_binary()
|
||||
# CMake function to imitate Bazel's cc_binary rule.
|
||||
#
|
||||
# Parameters:
|
||||
# NAME: name of target
|
||||
# HDRS: List of public header files for the library
|
||||
# SRCS: List of source files for the library
|
||||
# COPTS: List of private compile options
|
||||
# DEFINES: List of public defines
|
||||
# LINKOPTS: List of link options
|
||||
# DEPS: List of other libraries to be linked in to the binary targets
|
||||
#
|
||||
# cc_library(
|
||||
# NAME
|
||||
# awesome
|
||||
# HDRS
|
||||
# "a.h"
|
||||
# SRCS
|
||||
# "a.cc"
|
||||
# )
|
||||
# cc_binary(
|
||||
# NAME
|
||||
# fantastic
|
||||
# SRCS
|
||||
# "b.cc"
|
||||
# DEPS
|
||||
# :awesome
|
||||
# )
|
||||
#
|
||||
function(cc_binary)
|
||||
cmake_parse_arguments(
|
||||
CC_BINARY # prefix
|
||||
"" # options
|
||||
"NAME" # one value args
|
||||
"HDRS;SRCS;COPTS;DEFINES;LINKOPTS;DEPS" # multi value args
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
add_executable(${CC_BINARY_NAME} "")
|
||||
target_sources(${CC_BINARY_NAME}
|
||||
PRIVATE ${CC_BINARY_SRCS} ${CC_BINARY_HDRS}
|
||||
)
|
||||
target_link_libraries(${CC_BINARY_NAME}
|
||||
PUBLIC
|
||||
${CC_BINARY_DEPS}
|
||||
PRIVATE
|
||||
${CC_BINARY_LINKOPTS}
|
||||
)
|
||||
target_include_directories(${CC_BINARY_NAME}
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${COMMON_INCLUDE_DIRS}>"
|
||||
)
|
||||
target_compile_options(${CC_BINARY_NAME} PRIVATE ${CC_BINARY_COPTS})
|
||||
target_compile_definitions(${CC_BINARY_NAME} PUBLIC ${CC_BINARY_DEFINES})
|
||||
|
||||
add_executable(:${CC_BINARY_NAME} ALIAS ${CC_BINARY_NAME})
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user