Skip to content

Commit c9fc8a9

Browse files
committed
add mla_preprocess kernel
Signed-off-by: mojave2 <chenchen145@huawei.com>
1 parent 3d21ed9 commit c9fc8a9

31 files changed

+9044
-3
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ repos:
1212
- id: codespell
1313
args: [
1414
--toml, pyproject.toml,
15-
'--skip', 'tests/e2e/multicard/test_torchair_graph_mode.py,tests/prompts/**,./benchmarks/sonnet.txt,*tests/lora/data/**,build/**,./vllm_ascend.egg-info/**,.github/**,typos.toml',
16-
'-L', 'CANN,cann,NNAL,nnal,ASCEND,ascend,EnQue,CopyIn'
15+
'--skip', 'tests/e2e/multicard/test_torchair_graph_mode.py,csrc/mla_preprocess/**,tests/prompts/**,./benchmarks/sonnet.txt,*tests/lora/data/**,build/**,./vllm_ascend.egg-info/**,.github/**,typos.toml',
16+
'-L', 'CANN,cann,NNAL,nnal,ASCEND,ascend,EnQue,CopyIn,ArchType,AND'
1717
]
1818
additional_dependencies:
1919
- tomli
@@ -35,6 +35,10 @@ repos:
3535
rev: v1.32.0
3636
hooks:
3737
- id: typos
38+
args: [
39+
"--force-exclude",
40+
"--exclude", "csrc/mla_preprocess/**"
41+
]
3842
- repo: https://github.com/PyCQA/isort
3943
rev: 6.0.1
4044
hooks:

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ else()
4444
endif()
4545

4646
include(${ASCENDC_CMAKE_DIR}/ascendc.cmake)
47+
4748
file(GLOB KERNEL_FILES
4849
${CMAKE_CURRENT_SOURCE_DIR}/csrc/kernels/*.cpp)
4950

5051
ascendc_library(vllm_ascend_kernels SHARED
5152
${KERNEL_FILES}
53+
${CMAKE_CURRENT_SOURCE_DIR}/csrc/mla_preprocess/op_kernel/mla_preprocess_kernel.cpp
5254
)
5355

5456
message("TORCH_NPU_PATH is ${TORCH_NPU_PATH}")
@@ -90,7 +92,11 @@ target_link_libraries(
9092
libtorch_npu.so
9193
vllm_ascend_kernels
9294
ascendcl
95+
tiling_api
96+
register
9397
platform
98+
ascendalog
99+
dl
94100
)
95101

96102
target_link_options(vllm_ascend_C PRIVATE "-Wl,-rpath,$ORIGIN:$ORIGIN/lib")

0 commit comments

Comments
 (0)