include(cc_library)
include(cc_binary)


cc_library(
  NAME
    runtime
  HDRS
    options.h
    forward_params.h
    dit_forward_params.h
    params_utils.h
    executor.h
    executor_impl.h
    executor_impl_factory.h
    vlm_executor_impl.h
    base_executor_impl.h
    dit_executor.h
    $<$<BOOL:${USE_NPU}>:acl_graph_executor_impl.h>
    $<$<BOOL:${USE_MLU}>:mlu_graph_executor_impl.h>
    $<$<BOOL:${USE_CUDA}>:cuda_graph_executor_impl.h>
    worker.h
    worker_impl.h
    llm_worker_impl.h
    vlm_worker_impl.h
    dit_worker_impl.h
    embed_worker_impl.h
    embed_vlm_worker_impl.h
    rec_worker_impl.h
    mm_embed_vlm_worker_impl.h
    worker_client.h
    xservice_client.h
    speculative_worker_impl.h
    mtp_worker_impl.h
    suffix_worker_impl.h
    eagle3_worker_impl.h
    spec_input_builder.h
    forward_shared_memory_manager.h
    worker_rendezvous.h
  SRCS
    executor.cpp
    executor_impl_factory.cpp
    base_executor_impl.cpp
    vlm_executor_impl.cpp
    dit_executor.cpp
    $<$<BOOL:${USE_NPU}>:acl_graph_executor_impl.cpp>
    $<$<BOOL:${USE_MLU}>:mlu_graph_executor_impl.cpp>
    $<$<BOOL:${USE_CUDA}>:cuda_graph_executor_impl.cpp>
    worker.cpp
    worker_impl.cpp
    worker_rendezvous.cpp
    llm_worker_impl.cpp
    vlm_worker_impl.cpp
    dit_worker_impl.cpp
    embed_worker_impl.cpp
    embed_vlm_worker_impl.cpp
    rec_worker_impl.cpp
    mm_embed_vlm_worker_impl.cpp
    worker_client.cpp
    xservice_client.cpp
    params_utils.cpp
    speculative_worker_impl.cpp
    mtp_worker_impl.cpp
    suffix_worker_impl.cpp
    eagle3_worker_impl.cpp
    spec_input_builder.cpp
    forward_shared_memory_manager.cpp
  DEPS
    torch
    $<$<BOOL:${USE_NPU}>:torch_npu>
    :common
    :platform
    :model_context
    :request
    :state_dict
    :dit_cache
    :model
    :parallel_state
    :kv_cache
    :kv_cache_transfer
    :models
    :sampler
    :tokenizer
    :model_loader
    :util
    :worker_service
    :xllm_server
    $<$<BOOL:${USE_NPU}>:xllm_ops>
    $<$<BOOL:${USE_NPU}>:atb_customize>
    $<$<BOOL:${USE_NPU}>:platform_npu>
    :eplb
    glog::glog
    Folly::folly
    absl::strings
    absl::synchronization
    absl::flat_hash_map
    proto::xllm_proto
    $<$<BOOL:${USE_MLU}>:torch_mlu>
)
