adump/1_adump_callback
问题基本相同
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/runtime/runtime/example/adump/1_adump_callback/build
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
[100%] Linking CXX executable main
[100%] Built target main
-- Install configuration: "Debug"
[ERROR] Operation failed: aclrtSetDevice(deviceId) returned error code 507033
[ERROR] Operation failed: Init(deviceId, &stream, dumpCfgPath) returned error code -1


换了个用户,CANN版本换成了8.5.0而非beta1,且这个用户没有编源码译安装过runtime,样例顺利执行。接下来定位是CANN版本问题还是runtime编译安装导致的507033。


尊敬的用户,感谢您的反馈。
因为本地编译的原因,cann-npu-runtime 包中的插件包: cann-tsch-compat.tar.gz 未经官方签名,因此在setdevice阶段对该包做签名校验时会失败。
针对这种本地编译场景,有对应的cann包使用方案:可以将验签模式设置为关闭,跳过验签。
相关官方文档如下:
设置AI CPU算子用户自定义验签能力使能状态
设置AI CPU算子验签模式
具体方法是:
需要先打开验签能力使能开关,然后再修改验签模式为关闭
npu-smi set -t custom-op-secverify-enable -i 0 -d 1 # 0卡使能验签开关
npu-smi set -t custom-op-secverify-mode -i 0 -d 0 # 0卡关闭验签
该命令的 -i 字段代表 deviceId,-d 字段代表 value,更多的验签模式可以参考官方文档。


/assign @FengHaozhan


“编译-安装-执行”是软开基本流程和逻辑,从官仓直接拖下来的工程编译安装,无法启动Device,不合逻辑。请消除“验签步骤”。
无需跟开发者解释背后原因和机理以及“无法取消验签的困难”,易用性角度不会接受。


“编译-安装-执行”是软开基本流程和逻辑,从官仓直接拖下来的工程编译安装,无法启动Device,不合逻辑。请消除“验签步骤”。
无需跟开发者解释背后原因和机理以及“无法取消验签的困难”,易用性角度不会接受。
尊敬的用户您好,经评审,cann-tsch-compat.tar.gz插件包功能已下线,不会再阻塞runtime包的用例执行。代码合入链接如下:https://gitcode.com/cann/runtime/pull/1008。
请使用最新的runtime包进行验证。本地验证样例执行通过



Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
adump/0_adump_args样例执行失败

这里的报错,aclrcSetDevice,在同一个环境上,跑ops-transformer的时候不会出现。
Environment / 环境信息 (Mandatory / 必填)
Atlas800I A2,8卡裸金属
openEuler22.04,ARM
CANN8.5.0.beta1
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
安装CANN
编译、安装runtime最新版本包
设置好环境变量,
cd /home/runtime/runtime/example/adump/0_adump_args
bash run.sh
Describe the expected behavior / 预期结果 (Mandatory / 必填)
样例成功执行。
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/runtime/runtime/example/adump/0_adump_args/build
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
[100%] Linking CXX executable main
[100%] Built target main
-- Install configuration: "Debug"
[INFO] The dump data path is /tmp.
[ERROR] Operation failed: aclrtSetDevice(deviceId) returned error code 507033
[ERROR] Operation failed: aclrtMalloc(deviceAddr, size, ACL_MEM_MALLOC_HUGE_FIRST) returned error code 107002
[ERROR] Operation failed: CreateAclTensor(selfHostData, selfShape, &selfDeviceAddr, aclDataType::ACL_FLOAT, &self) returned error code -1
Special notes for this issue/备注 (Optional / 选填)