[feature] Add Custom Op grouped_matmul_swiglu_quant (#4431)
This PR introduces the `EXEC_NPU_CMD` macro, serving as an adapter layer to simplify the invocation of `aclnn` operators on Ascend NPUs. **Key Changes:** * **Adapter Layer:** Added `EXEC_NPU_CMD` macro and related dependencies to standardize `aclnn` calls. * **Operator Support:** Integrated `grouped_matmul_swiglu_quant` as a reference implementation to demonstrate the usage of the new macro. --- - vLLM version: v0.11.2 --------- Signed-off-by: SlightwindSec <slightwindsec@gmail.com>
This commit is contained in:
@@ -63,7 +63,8 @@ ascendc_library(vllm_ascend_kernels SHARED
|
||||
message("TORCH_NPU_PATH is ${TORCH_NPU_PATH}")
|
||||
|
||||
file(GLOB VLLM_ASCEND_SRC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/csrc/*.cpp)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/csrc/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/csrc/aclnn_torch_adapter/*.cpp)
|
||||
|
||||
include_directories(
|
||||
${pybind11_INCLUDE_DIRS}
|
||||
@@ -88,6 +89,7 @@ pybind11_add_module(vllm_ascend_C ${VLLM_ASCEND_SRC})
|
||||
target_link_directories(
|
||||
vllm_ascend_C
|
||||
PRIVATE
|
||||
${TORCH_LIBRARY_DIRS}
|
||||
${TORCH_NPU_PATH}/lib/
|
||||
${ASCEND_HOME_PATH}/lib64
|
||||
)
|
||||
@@ -96,7 +98,7 @@ target_link_libraries(
|
||||
vllm_ascend_C
|
||||
PUBLIC
|
||||
${TORCH_LIBRARIES}
|
||||
libtorch_npu.so
|
||||
torch_npu
|
||||
vllm_ascend_kernels
|
||||
ascendcl
|
||||
tiling_api
|
||||
@@ -104,6 +106,7 @@ target_link_libraries(
|
||||
platform
|
||||
ascendalog
|
||||
dl
|
||||
opapi
|
||||
)
|
||||
|
||||
target_link_options(vllm_ascend_C PRIVATE "-Wl,-rpath,$ORIGIN:$ORIGIN/lib")
|
||||
|
||||
Reference in New Issue
Block a user