已合并
debug apis: fix printf on cpu_debug mode #889
debug apis: fix printf on cpu_debug mode #889
已合并
liuliu876创建于 3月13日
liuliu876成员
3月13日

描述

cpu debug模式下printf新接口解耦

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 liuliu876 的贡献)
Lliuliu876成员
3月13日 创建了 pull request,commit 2fa8b642
CANN-robot
CANN-robot成员
3月13日 评论:

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
repo-cann/asc-devkit XuebinYang, xun_zhuge (2/2) XuebinYang (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
3月13日 将zengjuan,zhanghao_0689,yanqingshang,wulinyu,zhuliangying,kong0808,dengjing_aoe,YeZZzzz1,bluesky901,wqtshg_wt,yangbinhua,gao_dafa,chenyiyuan,xun_zhuge,ookkkkoo1122,bianque,houyuyang,shi_nanxiang,wuyang_hw,ascendhjh,DragonBornHD84,jiangZD设为评审人
CANN-robotCANN-robot成员
3月13日 将zengjuan,zhanghao_0689,yanqingshang,wulinyu,zhuliangying,kong0808,dengjing_aoe,YeZZzzz1,bluesky901,wqtshg_wt,yangbinhua,gao_dafa,chenyiyuan,xun_zhuge,ookkkkoo1122,bianque,houyuyang,shi_nanxiang,wuyang_hw,ascendhjh,DragonBornHD84,jiangZD设为审查人
CANN-robot
CANN-robot成员
3月13日 评论:

🔵 source code change are detected, tasks labels is removed in this pull request!

likedislike
CANN-robotCANN-robot成员
3月13日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
3月13日 评论:

问题/功能描述

修复在非NPU(CPU)调试模式下,printf_impl函数未实际执行格式化输出的问题。当代码在CPU环境下编译并启用调试时,原先的空实现无法输出任何调试信息,导致调试功能失效。

修改方案描述

在CPU调试模式(#else分支)的代码中,为printf_impl函数添加了实际的功能实现。具体修改包括:引入<cstdio>头文件以使用标准C库的printf函数,并将原先的空函数体替换为调用std::printf,从而将格式化字符串和参数正确输出到标准输出,恢复了CPU环境下的调试信息打印能力。

likedislike
Lliuliu876成员
3月13日 修改了pull request 的描述
liuliu876成员
3月13日 评论:

compile

likedislike
CANN-robotCANN-robot成员
3月13日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
3月13日 评论:

流水线任务触发成功
任务链接 [522a277c32e343a58da23a6f3f60b091][流水线指导]

任务名称状态日志下载链接
解析CI分支 ✅ SUCCESS
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
API_Check ✅ SUCCESS >>>>>
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>>
UT_Test_3 ✅ SUCCESS
UT_Test_2 ✅ SUCCESS
UT_Test_1 ✅ SUCCESS
UT_Test ✅ SUCCESS
UT_Test_report ✅ SUCCESS >>>>>

[2026-03-13 16:42:18]    CI执行结束

likedislike
XuebinYang成员
3月13日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
3月13日 添加了label:approved
zhugexun_sjtu
zhugexun_sjtu成员
3月13日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
3月13日 添加了label:lgtm
CANN-robotCANN-robot成员
3月13日 添加了label:api-check-pass
CANN-robotCANN-robot成员
3月13日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
3月13日 添加了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
3月13日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: XuebinYang.
Reviewers who wrote a comment of /lgtm are: XuebinYang, xun_zhuge.

likedislike
CANN-robotCANN-robot成员
3月13日 合入了pull request