From f115aabb07743c9cd8335fe00febbcd39b097b2d Mon Sep 17 00:00:00 2001 From: ZT-AIA <1028681969@qq.com> Date: Sat, 4 Jul 2026 23:30:58 +0800 Subject: [PATCH 1/3] fix cann Signed-off-by: ZT-AIA <1028681969@qq.com> --- .gitignore | 13 ------------- csrc/CMakeLists.txt | 5 +++++ csrc/common/include/cann_compat.h | 30 ++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 csrc/common/include/cann_compat.h diff --git a/.gitignore b/.gitignore index 20af3005c99d..84d52898a5bd 100644 --- a/.gitignore +++ b/.gitignore @@ -28,11 +28,6 @@ __pycache__/ # Distribution / packaging .Python build/ -build_out/ -!csrc/cmake/third_party/build/ -!csrc/cmake/third_party/build/modules/ -!csrc/cmake/third_party/build/modules/patch/ -!csrc/cmake/third_party/build/modules/patch/*.patch develop-eggs/ dist/ downloads/ @@ -215,11 +210,3 @@ kernel_meta/ # generated by CANN fusion_result.json csrc/output/ -csrc/third_party/ - -# claude code skills -.claude/skills/* - -.codegraph/ - -.vllm_ascend/ diff --git a/csrc/CMakeLists.txt b/csrc/CMakeLists.txt index b8e0cc2a9f26..67d2ed36ccf6 100644 --- a/csrc/CMakeLists.txt +++ b/csrc/CMakeLists.txt @@ -99,7 +99,12 @@ set_directory_properties(PROPERTIES ) # Suppress warnings from catlass/tla third-party headers for CANN kernel compilation +set(VLLM_ASCEND_CANN_COMPAT_HEADER "${OPS_TRANSFORMER_DIR}/common/include/cann_compat.h") list(APPEND OPS_COMPILE_OPTIONS -Wno-ignored-attributes) +list(APPEND OPS_COMPILE_OPTIONS -include${VLLM_ASCEND_CANN_COMPAT_HEADER}) +add_compile_options( + $<$:-include${VLLM_ASCEND_CANN_COMPAT_HEADER}> +) include(cmake/config.cmake) include(cmake/func.cmake) diff --git a/csrc/common/include/cann_compat.h b/csrc/common/include/cann_compat.h new file mode 100644 index 000000000000..c04c64d6ab32 --- /dev/null +++ b/csrc/common/include/cann_compat.h @@ -0,0 +1,30 @@ +#pragma once + +#include + +// B080 op_common/log/log.h stopped exposing the unqualified OP module id used +// by inherited ops-transformer tiling/error headers. Include the CANN log type +// header early so OP still comes from the active CANN version. +#if defined(__has_include) +#if __has_include("base/log_types.h") +#include "base/log_types.h" +#elif __has_include("toolchain/log_types.h") +#include "toolchain/log_types.h" +#endif +#endif + +#if !defined(LOG_TYPES_H_) && !defined(OP) +#define OP 63 +#endif + +#if defined(LOG_CPP) && !defined(DLOG_PUB_H_) +#ifdef __cplusplus +extern "C" { +#endif +int32_t CheckLogLevel(int32_t moduleId, int32_t logLevel); +void DlogRecord(int32_t moduleId, int32_t level, const char *fmt, ...); +#ifdef __cplusplus +} +#endif +#define DLOG_PUB_H_ +#endif From a6780a5fb720ee3bfea695a260622c16c2bec1aa Mon Sep 17 00:00:00 2001 From: ZT-AIA <1028681969@qq.com> Date: Sat, 4 Jul 2026 23:35:34 +0800 Subject: [PATCH 2/3] fix cann Signed-off-by: ZT-AIA <1028681969@qq.com> --- .gitignore | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitignore b/.gitignore index 84d52898a5bd..6b712b3086bc 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,11 @@ __pycache__/ # Distribution / packaging .Python build/ +build_out/ +!csrc/cmake/third_party/build/ +!csrc/cmake/third_party/build/modules/ +!csrc/cmake/third_party/build/modules/patch/ +!csrc/cmake/third_party/build/modules/patch/*.patch develop-eggs/ dist/ downloads/ @@ -210,3 +215,11 @@ kernel_meta/ # generated by CANN fusion_result.json csrc/output/ +csrc/third_party/ + +# claude code skills +.claude/skills/* + +.codegraph/ + +.vllm_ascend/ \ No newline at end of file From 8705770751b757621b196c9807b74b5e3ef57058 Mon Sep 17 00:00:00 2001 From: ZT-AIA <1028681969@qq.com> Date: Sat, 4 Jul 2026 23:36:34 +0800 Subject: [PATCH 3/3] fix cann Signed-off-by: ZT-AIA <1028681969@qq.com> --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6b712b3086bc..20af3005c99d 100644 --- a/.gitignore +++ b/.gitignore @@ -222,4 +222,4 @@ csrc/third_party/ .codegraph/ -.vllm_ascend/ \ No newline at end of file +.vllm_ascend/