### What this PR does / why we need it? This PR introduces the Ascend implementation of the `dispatch_ffn_combine` kernel and wires it into the vLLM-Ascend runtime, together with follow‑up fixes to ensure the kernel builds and runs correctly in CI. - Add full host and device implementation of the `dispatch_ffn_combine` kernel under `csrc/dispatch_ffn_combine`, including tiling logic, MOE routing helpers, and kernel utilities for quantized FFN dispatch. - Integrate the new kernel with the PyTorch binding (csrc/torch_binding.cpp, csrc/torch_binding_meta.cpp) and the Ascend runtime (vllm_ascend/ascend_forward_context.py, vllm_ascend/worker/model_runner_v1.py). - Extend fused MoE communication and token dispatch support in `vllm_ascend/ops/fused_moe`, adding methods/utilities needed by the new dispatch path. - Update quantization logic in vllm_ascend/quantization/w8a8_dynamic.py to support the new FFN dispatch flow. - Fix kernel build issues by adjusting `csrc/build_aclnn.sh`, CMake configuration, and include/namespace usage in the new kernel files. - Add an end‑to‑end nightly test `tests/e2e/nightly/ops/test_dispatch_ffn_combine.py` and helper utilities in `vllm_ascend/utils.py` to validate the new kernel. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.12.0 - vLLM main: https://github.com/vllm-project/vllm/commit/v0.12.0 --------- Signed-off-by: mojave2 <chenchen145@huawei.com> Co-authored-by: wangxiyuan <wangxiyuan1007@gmail.com>
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
#ifndef OPS_BUILT_IN_OP_TILING_ERROR_LOG_H_
|
|
#define OPS_BUILT_IN_OP_TILING_ERROR_LOG_H_
|
|
|
|
#include <string>
|
|
#include "toolchain/slog.h"
|
|
|
|
#define OP_LOGI(opname, ...)
|
|
#define OP_LOGW(opname, ...) \
|
|
do { \
|
|
printf("[WARN][%s] ", (opname)); \
|
|
printf(__VA_ARGS__); \
|
|
printf("\n"); \
|
|
} while (0)
|
|
|
|
#define OP_LOGE_WITHOUT_REPORT(opname, ...) \
|
|
do { \
|
|
printf("[ERRORx][%s] ", (opname)); \
|
|
printf(__VA_ARGS__); \
|
|
printf("\n"); \
|
|
} while (0)
|
|
|
|
#define OP_LOGE(opname, ...) \
|
|
do { \
|
|
printf("[ERROR][%s] ", (opname)); \
|
|
printf(__VA_ARGS__); \
|
|
printf("\n"); \
|
|
} while (0)
|
|
|
|
#define OP_LOGD(opname, ...)
|
|
|
|
namespace optiling {
|
|
|
|
#define VECTOR_INNER_ERR_REPORT_TILIING(op_name, err_msg, ...) \
|
|
do { \
|
|
OP_LOGE_WITHOUT_REPORT(op_name, err_msg, ##__VA_ARGS__); \
|
|
} while (0)
|
|
|
|
#define OP_TILING_CHECK(cond, log_func, expr) \
|
|
do { \
|
|
if (cond) { \
|
|
log_func; \
|
|
expr; \
|
|
} \
|
|
} while (0)
|
|
} // namespace optiling
|
|
|
|
#endif // OPS_BUILT_IN_OP_TILING_ERROR_LOG_H_
|