Skip to content

Commit 322803c

Browse files
authored
refactor: refine layers dir to support other cuda like devices. (#277)
1 parent bb2628d commit 322803c

31 files changed

+38
-52
lines changed

xllm/core/framework/model/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ set(BASE_DEPS
1515
)
1616

1717
if(USE_NPU)
18-
# Modify dependencies for npu
19-
list(APPEND BASE_DEPS torch_npu)
2018
list(APPEND BASE_DEPS :npu_layers)
2119
list(APPEND BASE_DEPS :platform_npu)
20+
else()
21+
list(APPEND BASE_DEPS :common_layers)
2222
endif()
2323

24-
if(USE_MLU)
25-
# Modify dependencies for mlu
26-
list(APPEND BASE_DEPS torch_mlu)
27-
list(APPEND BASE_DEPS :mlu_layers)
28-
endif()
2924

3025
# Define the library
3126
cc_library(

xllm/core/layers/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ cc_library(
7979

8080
if(USE_NPU)
8181
add_subdirectory(npu)
82-
endif()
83-
if(USE_MLU)
84-
add_subdirectory(mlu)
82+
else()
83+
add_subdirectory(common)
8584
endif()

xllm/core/layers/mlu/CMakeLists.txt renamed to xllm/core/layers/common/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include(cc_test)
44

55
cc_library(
66
NAME
7-
mlu_layers
7+
common_layers
88
HDRS
99
qwen3_attention.h
1010
attention.h
@@ -15,7 +15,7 @@ cc_library(
1515
qwen3_decoder_layer.h
1616
qwen3_moe_decoder_layer.h
1717
linear_impl.h
18-
mlu_word_embedding_impl.h
18+
word_embedding_impl.h
1919
SRCS
2020
qwen3_attention.cpp
2121
attention.cpp
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)