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:
69
upstream_ref/xllm/cmake/proto_library.cmake
Normal file
69
upstream_ref/xllm/cmake/proto_library.cmake
Normal file
@@ -0,0 +1,69 @@
|
||||
include(CMakeParseArguments)
|
||||
include(CMakePrintHelpers)
|
||||
|
||||
# inspired by https://github.com/abseil/abseil-cpp
|
||||
# proto_library()
|
||||
# CMake function to imitate Bazel's proto_library rule.
|
||||
#
|
||||
# Parameters:
|
||||
# NAME: name of target
|
||||
# SRCS: List of proto source files for the library
|
||||
# DEPS: List of other libraries to be linked in to the binary targets
|
||||
# COPTS: List of private compile options
|
||||
# DEFINES: List of public defines
|
||||
# LINKOPTS: List of link options
|
||||
#
|
||||
# cc_library(
|
||||
# NAME
|
||||
# awesome
|
||||
# HDRS
|
||||
# "a.h"
|
||||
# SRCS
|
||||
# "a.cc"
|
||||
# )
|
||||
# proto_library(
|
||||
# NAME
|
||||
# proto_lib
|
||||
# SRCS
|
||||
# "b.proto"
|
||||
# DEPS
|
||||
# :awesome
|
||||
# )
|
||||
#
|
||||
function(proto_library)
|
||||
# parse arguments and set variables
|
||||
cmake_parse_arguments(
|
||||
PROTO_LIB # prefix
|
||||
"" # options
|
||||
"NAME" # one value args
|
||||
"SRCS;COPTS;DEFINES;LINKOPTS;DEPS" # multi value args
|
||||
${ARGN}
|
||||
)
|
||||
# generate cpp and hpp files from proto files using protoc compiler
|
||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_LIB_SRCS})
|
||||
|
||||
add_library(${PROTO_LIB_NAME} STATIC)
|
||||
target_sources(${PROTO_LIB_NAME}
|
||||
PRIVATE ${PROTO_SRCS} ${PROTO_HDRS}
|
||||
)
|
||||
|
||||
target_link_libraries(${PROTO_LIB_NAME}
|
||||
PUBLIC protobuf::libprotobuf
|
||||
)
|
||||
target_include_directories(${PROTO_LIB_NAME}
|
||||
PUBLIC
|
||||
${Protobuf_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
target_compile_options(${PROTO_LIB_NAME}
|
||||
PRIVATE
|
||||
${PROTO_LIB_COPTS}
|
||||
-Wno-unused-parameter
|
||||
)
|
||||
target_compile_definitions(${PROTO_LIB_NAME}
|
||||
PUBLIC
|
||||
${PROTO_LIB_DEFINES}
|
||||
)
|
||||
|
||||
add_library(proto::${PROTO_LIB_NAME} ALIAS ${PROTO_LIB_NAME})
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user