算子异常检测(msSanitizer)
msSanitizer工具作用于算子开发的整个周期,帮助开发者确保算子的质量和稳定性。通过在早期阶段发现并修复异常,msSanitizer大大减少了产品上线后的潜在风险和后期维护成本。

- 启动工具后,将会在当前目录下自动生成工具运行日志文件mssanitizer_{TIMESTAMP}_{PID}.log,当用户程序运行完成后,界面将会打印异常报告。
- ${git_clone_path}为sample仓的路径。
- 在${git_clone_path}/samples/operator/ascendc/0_introduction/1_add_frameworklaunch目录下执行以下命令,生成自定义算子工程,进行host侧和kernel侧的算子实现。
bash install.sh -v Ascendxxxyy # xxxyy为用户实际使用的具体芯片类型
- 在${git_clone_path}/samples/operator/ascendc/0_introduction/1_add_frameworklaunch/CustomOp目录下执行以下命令,重新编译部署算子。
bash build.sh ./build_out/custom_opp_<target_os>_<target_architecture>.run // 当前目录下run包的名称
- 切换到${git_clone_path}/samples/operator/ascendc/0_introduction/1_add_frameworklaunch/AclNNInvocation目录,拉起算子API运行脚本,进行内存检测。
- 进行竞争检测。
- 进行未初始化检测。
父主题: 算子开发工具快速入门