Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2c1850e
feat: add FlashComm1 and MMRS fusion support
Cooofish Jul 7, 2026
12b45dc
Merge branch 'main' into flashcomm1-pr-default-off
pjgao Jul 7, 2026
17a9648
bugfix: make flashcomm1 pr build reliably.
Cooofish Jul 7, 2026
48672c1
refactor: simplify flashcomm1 mmrs wrapper.
Cooofish Jul 7, 2026
385a67f
Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 7, 2026
e24773e
Merge branch 'main' into flashcomm1-pr-default-off
pjgao Jul 7, 2026
5f0a4e0
bugfix: address flashcomm1 review comments.
Cooofish Jul 7, 2026
f9b4934
bugfix: drop cmake and third_party changes from flashcomm1 pr.
Cooofish Jul 7, 2026
179a4cd
Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 7, 2026
bf3d04f
refactor: reduce flashcomm1 pr diff scope
Cooofish Jul 8, 2026
0768651
merge: resolve conflicts with latest main
Cooofish Jul 13, 2026
4a239c7
merge: resolve conflicts with latest main
Cooofish Jul 20, 2026
19b1f31
Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 20, 2026
8c24997
Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 21, 2026
a0535fa
style: format flashcomm1 changes for ci.
Cooofish Jul 21, 2026
2b5a7d1
Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 21, 2026
93ccc08
Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 21, 2026
b56d8e5
merge: resolve PR conflicts with latest main.
Cooofish Jul 22, 2026
e1d5e7e
refactor: align FC1 config and backend scope.
Cooofish Jul 22, 2026
ab428ba
refactor: remove unused FC1 MMRS buffers
Cooofish Jul 22, 2026
f189579
refactor: share row-parallel forward implementation
Cooofish Jul 22, 2026
80b4afd
Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 22, 2026
971dd79
fix: remove stale MMRS output validation
Cooofish Jul 22, 2026
15df323
fix: address flashcomm1 review feedback
Cooofish Jul 23, 2026
6fa9994
@Cooofish Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 23, 2026
d7c411b
fix: address FlashComm1 review comments
Cooofish Jul 24, 2026
a41771c
fix: harden MMRS weight lifecycle
Cooofish Jul 24, 2026
16a9d89
refactor: remove stale FlashComm1 paths
Cooofish Jul 24, 2026
b931967
refactor: clean up remaining FlashComm1 residue
Cooofish Jul 24, 2026
bf0a955
Merge branch 'main' into flashcomm1-pr-default-off
Cooofish Jul 24, 2026
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
46 changes: 45 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,53 @@ find_package(benchmark CONFIG REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)
find_package(OpenCV CONFIG REQUIRED)
find_package(FFMPEG REQUIRED)
find_package(Python COMPONENTS Development REQUIRED)
find_package(Python COMPONENTS Interpreter Development REQUIRED)
find_package(pybind11 CONFIG REQUIRED)

if(USE_NPU)
function(xllm_set_env_from_python VAR PYTHON_CODE)
if("$ENV{${VAR}}" STREQUAL "")
execute_process(
COMMAND ${Python_EXECUTABLE} -c "${PYTHON_CODE}"
OUTPUT_VARIABLE XLLM_INFERRED_ENV_VALUE
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_VARIABLE XLLM_INFERRED_ENV_ERROR
RESULT_VARIABLE XLLM_INFERRED_ENV_RESULT
)
if(NOT XLLM_INFERRED_ENV_RESULT EQUAL 0 OR "${XLLM_INFERRED_ENV_VALUE}" STREQUAL "")
message(FATAL_ERROR "Failed to infer ${VAR}: ${XLLM_INFERRED_ENV_ERROR}")
endif()
set(ENV{${VAR}} "${XLLM_INFERRED_ENV_VALUE}")
message(STATUS "Inferred ${VAR}: $ENV{${VAR}}")
endif()
endfunction()

if("$ENV{PYTHON_INCLUDE_PATH}" STREQUAL "")
set(ENV{PYTHON_INCLUDE_PATH} "${Python_INCLUDE_DIRS}")
endif()
if("$ENV{PYTHON_LIB_PATH}" STREQUAL "")
execute_process(
COMMAND ${Python_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR') or '')"
OUTPUT_VARIABLE XLLM_PYTHON_LIB_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(ENV{PYTHON_LIB_PATH} "${XLLM_PYTHON_LIB_PATH}")
endif()
xllm_set_env_from_python(PYTORCH_INSTALL_PATH "import importlib.util; spec = importlib.util.find_spec('torch'); print(spec.submodule_search_locations[0])")
xllm_set_env_from_python(PYTORCH_NPU_INSTALL_PATH "import importlib.util; spec = importlib.util.find_spec('torch_npu'); print(spec.submodule_search_locations[0])")
if(NOT EXISTS "$ENV{PYTORCH_NPU_INSTALL_PATH}/include/torch_npu/torch_npu.h"
AND EXISTS "/usr/local/libtorch_npu/include/torch_npu/torch_npu.h")
set(ENV{PYTORCH_NPU_INSTALL_PATH} "/usr/local/libtorch_npu")
message(STATUS "Using PYTORCH_NPU_INSTALL_PATH with compatibility header: $ENV{PYTORCH_NPU_INSTALL_PATH}")
endif()
if("$ENV{LIBTORCH_ROOT}" STREQUAL "")
set(ENV{LIBTORCH_ROOT} "$ENV{PYTORCH_INSTALL_PATH}")
endif()
if("$ENV{NPU_HOME_PATH}" STREQUAL "" AND NOT "$ENV{ASCEND_HOME_PATH}" STREQUAL "")
set(ENV{NPU_HOME_PATH} "$ENV{ASCEND_HOME_PATH}")
endif()
endif()

if (USE_CXX11_ABI)
# only use jemalloc if using the new C++-11 ABI
find_package(Jemalloc)
Expand Down
10 changes: 4 additions & 6 deletions cmake/FindRust.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ else()
set(USER_HOME "$ENV{HOME}")
endif()

if(NOT DEFINED CARGO_HOME)
if("$ENV{CARGO_HOME}" STREQUAL "")
set(CARGO_HOME "${USER_HOME}/.cargo")
else()
set(CARGO_HOME "$ENV{CARGO_HOME}")
endif()
if(NOT "$ENV{CARGO_HOME}" STREQUAL "")
set(CARGO_HOME "$ENV{CARGO_HOME}" CACHE PATH "Rust Cargo Home" FORCE)
elseif(NOT DEFINED CARGO_HOME)
set(CARGO_HOME "${USER_HOME}/.cargo")
endif()

# Find cargo executable
Expand Down
4 changes: 3 additions & 1 deletion cmake/cargo_library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ function(cargo_library)

file(GLOB_RECURSE LIB_SOURCES "*.rs")

set(CARGO_ENV_COMMAND ${CMAKE_COMMAND} -E env "CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}")
Comment thread
pjgao marked this conversation as resolved.
set(CARGO_ENV_COMMAND ${CMAKE_COMMAND} -E env
"CARGO_HOME=${CARGO_HOME}"
"CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}")

# build the library target with cargo
set(STATIC_LIB_NAME
Expand Down
4 changes: 3 additions & 1 deletion cmake/cargo_shared_library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ function(cargo_shared_library)

file(GLOB_RECURSE LIB_SOURCES "*.rs")

set(CARGO_ENV_COMMAND ${CMAKE_COMMAND} -E env "CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}")
set(CARGO_ENV_COMMAND ${CMAKE_COMMAND} -E env
"CARGO_HOME=${CARGO_HOME}"
"CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}")

# build the library target with cargo
set(SHARED_LIB_NAME
Expand Down
2 changes: 1 addition & 1 deletion third_party/xllm_atb_layers
Submodule xllm_atb_layers updated from 4b926e to 5b50a7
2 changes: 1 addition & 1 deletion third_party/xllm_ops
Submodule xllm_ops updated from bbbdfe to e7d825
3 changes: 3 additions & 0 deletions xllm/core/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ cc_library(
types.h
device_monitor.h
version_singleton.h
flash_comm1_context.h
SRCS
etcd_client.cpp
metrics.cpp
$<$<BOOL:${USE_NPU}>:mspti_helper.cpp>
options.cpp
rate_limiter.cpp
device_monitor.cpp
flash_comm1_context.cpp
DEPS
:config
util
parallel_state
absl::random_random
absl::strings
torch
Expand Down
Loading