已合并
refactor: 去除显式CheckLogLevel调用,改为使用OP_LOGD正式日志接口 (9.1.0) #7052
refactor: 去除显式CheckLogLevel调用,改为使用OP_LOGD正式日志接口 (9.1.0) #7052
已合并
huang-chuhong创建于 6月16日
huang-chuhong成员
6月16日

描述

参考 ops-math PR 913,将 attention、common、tests 下显式调用 CheckLogLevel 的地方替换为 OP_LOGD 正式日志接口,由 OP_LOGD 内部处理日志级别判断。

从 master 分支 PR #7003 cherry-pick 到 9.1.0 分支。

改动

  • common/include/op_host/tiling_base.h: DumpTilingInfo 抽取 DefaultTilingInfoDump(),用 OP_LOGD 包裹调用替代 CheckLogLevel 守卫
  • attention/arch35/flash_attention_score_tiling_regbase: PrintSparseMaxMinLoadPerCore 返回类型 void→int64_t,调用处用 OP_LOGD 包裹
  • attention/arch22/flash_attention_score_tiling_general: 同上
  • tests/ut/framework_special/utils/inc/tests/utils/log.h: LOG_DBG 宏改用 OP_LOGD 替代 CheckLogLevel fprintf
  • cmake/obj_func.cmake: opbase_util_objs 添加 ${ASCEND_DIR}/pkg_inc 到 include 目录
  • common/include/err/ops_err.h: 使用 OP_TRANSFORMER_MODULE_ID 替代 OP

关联的Issue

#3142

测试

  • 原有日志输出行为不变,OP_LOGD 内部已处理级别判断
  • 不传新参数时原有行为不受影响

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 huang-chuhong 的贡献)
Hhuang-chuhong成员
6月16日 创建了 pull request,commit 8092aa41
Hhuang-chuhong成员
6月16日 关联了issue:[Requirement|需求建议]: alltoallmatmul和matmulalltoall算子增加适配mx量化场景
CANN-robotCANN-robot成员
6月16日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
6月16日 评论:

CLA Signature Pass

huang-chuhong, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robot
CANN-robot成员
6月16日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
attention haijie_699874, tang-hao-hw-gitcode (2/2) haijie_699874, tang-hao-hw-gitcode (2/1)
cmake wang-minbo, xtqh (2/2) wang-minbo (1/1)
common xtqh, wang-minbo (2/2) wang-minbo (1/1)
tests wang-minbo, xtqh (2/2) wang-minbo (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
Hhuang-chuhong成员
6月16日 修改了pull request 的描述
huang-chuhong成员
6月16日 评论:

compile

likedislike
Hhuang-chuhong成员
6月16日 update merge request[project id: 7673863, iid: 7052, commit_id: 2bd32ff1c5634d61afa3d470bcf4dcad3b773522] virtual merging success
Hhuang-chuhong成员
6月16日 修改了pull request 的描述
CANN-robotCANN-robot成员
6月16日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6月16日 评论:

流水线任务触发成功
任务链接 [3d2e065c40b34625b6a9aa78a737b352][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental_950 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-06-16 20:16:21]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
6月16日 评论:

流水线任务触发成功
任务链接 [9419105ba82f444a8a5af8cfc329e2fa][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_style ✅ SUCCESS >>>>>
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_checkpr ✅ SUCCESS
codecheck_precommit ⚠️ WARNING >>>>> >>>>>

[2026-06-16 20:04:47]    CI执行结束

likedislike
Hhuang-chuhong成员
6月16日 修改了pull request 的描述
CANN-robotCANN-robot成员
6月16日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6月16日 添加了label:ci-pipeline-passed
Hhuang-chuhong成员
6月16日 修改了pull request 的描述
xtqh成员
6月17日 评论:

/lgtm

likedislike
tang-hao-hw-gitcode成员
6月17日 评论:

/approve

likedislike
张海杰
张海杰成员
6月17日 评论:

/approve

likedislike
wang-minbo成员
6月17日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月17日 添加了label:lgtmapproved
CANN-robotCANN-robot成员
6月17日 关闭了关联的issue
CANN-robotCANN-robot成员
6月17日 合入了pull request