切换版块
×
基础软件平台
PyTorch开发
TensorFlow开发
编解码及SDK开发
BANG语言与计算库
开发工具链
MagicMind开发
软件栈百科
云平台集成
硬件产品专区
MLU370系列AI加速卡
MLU270系列AI加速卡
MLU220系列AI加速产品
经验方案交流区
经验案例与实践分享
开发者服务
开发者活动
公告与版务
高校支持
《智能计算系统》
签到
版块
社区
文档
SDK下载
370系列
200系列
开发平台
官网首页
注册
登录
全部版块
基础软件平台
硬件产品专区
经验方案交流区
开发者服务
高校支持
发布新帖
登录/注册
LV.1
lly
21
积分
0
赞
1
帖子
13
回复
0
收藏
TA的动态
TA的帖子
TA的回复
无法使用cngdb调试设备端代码
我的回复:#9zhangyanting回复您好,生成的-o文件需要进行再编译,以得到可调式程序,您可以参考:CNGDB 安装 — 寒武纪CNGDB用户手册 v1.14.0 文档 (cambricon.com)展开quick_sort无法通过编译root@localhost:/home/samples/usrSamples/sort# cncc recursion.mlu -o recursion.o -g -O0 --bang-mlu-arch=MLU270 --bang-device-only root@localhost:/home/samples/usrSamples/sort# g++ recursion.o main.cpp -o quick_sort -lcnrt -I/usr/local/neuware/include/ -L/usr/local/neuware/lib64 /tmp/ccksbGG3.o: In function `main': main.cpp:(.text+0x507): undefined reference to `kernel' collect2: error: ld returned 1 exit status
0
无法使用cngdb调试设备端代码
我的回复:#10lly回复你好,我按照上面的示例,可以编译,使用cngdb还是不行[代码]执行过程如上面所示
0
无法使用cngdb调试设备端代码
我的回复:#9zhangyanting回复您好,生成的-o文件需要进行再编译,以得到可调式程序,您可以参考:CNGDB 安装 — 寒武纪CNGDB用户手册 v1.14.0 文档 (cambricon.com)展开你好,我按照上面的示例,可以编译,使用cngdb还是不行root@localhost:/home/samples/usrSamples/sort# cncc kernel.mlu -o kernel.o -g -O0 --bang-mlu-arch=MLU270 --bang-device-only root@localhost:/home/samples/usrSamples/sort# g++ kernel.o main.cpp -o multicore -lcnrt -lcnrt -I /usr/local/neuware/include/ -L /usr/local/neuware/lib64/ root@localhost:/home/samples/usrSamples/sort# cngdb ./multicore CNGDB v1.14.0 Internal Edition (based on GNU gdb 7.11.1) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./multicore...done. (cn-gdb) b kernel.mlu :6 if i==0 Breakpoint 1 at 0x7eb: file kernel.mlu, line 6. (cn-gdb) r Starting program: /home/samples/usrSamples/sort/multicore [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". CNRT: 4.10.1 a884a9a Union Type: CNRT_FUNC_TYPE_UNION1 [Switch from logical device 0 cluster 0 core 0 to logical device 0 cluster 0 core 1.] [Switch from logical device 0 cluster 0 core 1 to logical device 0 cluster 0 core 2.] [Switch from logical device 0 cluster 0 core 2 to logical device 0 cluster 0 core 3.] [Switch from logical device 0 cluster 0 core 3 to logical device 0 cluster 0 core 4.] [Switch from logical device 0 cluster 0 core 4 to logical device 0 cluster 0 core 0.] [Switch from logical device 0 cluster 0 core 0 to logical device 0 cluster 0 core 1.] [Switch from logical device 0 cluster 0 core 1 to logical device 0 cluster 0 core 2.] [Switch from logical device 0 cluster 0 core 2 to logical device 0 cluster 0 core 3.] [Switch from logical device 0 cluster 0 core 3 to logical device 0 cluster 0 core 0.] [Switch from logical device 0 cluster 0 core 0 to logical device 0 cluster 0 core 1.] [Switch from logical device 0 cluster 0 core 1 to logical device 0 cluster 0 core 2.] [Switch from logical device 0 cluster 0 core 2 to logical device 0 cluster 0 core 4.] 2 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 FAILED [Inferior 1 (process 1925) exited normally] (cn-gdb)
0
无法使用cngdb调试设备端代码
我的回复:#7lly回复[图片]开发平台的这两个镜像我都试了,好像都不行
0
无法使用cngdb调试设备端代码
我的回复:#6lly回复[图片]matrixmul.zi抱歉,我重新传了下。这个就是安装包samples`/samples/BANG/bang-c/matrixmul`中matrixmul.mlu文件展开
0
无法使用cngdb调试设备端代码
我的回复:#5zhangyanting回复您好,mat.zip中的文件内容为空,请您检查下上传文件中内容的完整性。matrixmul.zi抱歉,我重新传了下。这个就是安装包samples`/samples/BANG/bang-c/matrixmul`中matrixmul.mlu文件
0
无法使用cngdb调试设备端代码
我的回复:#3zhangyanting回复您好,请您提供一下您使用的代码和具体的调试流程,MLU270是可以使用CNGDB进行调试的mat.zip 代码编译命令`cncc matrixmul.mlu -o mat -g -O0 --bang-mlu-arch=MLU270`进行调试命令为`cngdb ./mat`进入cngdb后执行`b main`,`r`,`cngdb breakpoints on`,`b 47`,`r`程序直接结束,没有在设备端代码的47停留
0
无法使用cngdb调试设备端代码
我的回复:#1zhangyanting回复您好,请您提供一下设备端型号,以及您使用的工程代码,以方便我们定位问题。你好,我是使用的寒武纪开发平台上的容器进行代码调试的,设备是mlu270
0
Github
开发平台
文档中心
新手必读
官方微信
版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:
京ICP备17003415号-1
关闭