已合并
[msprof]补充Capture Stream与MC2通信信息Parser C化模块 #398
gcw_648Mce95创建于 8月4日
[msprof]补充Capture Stream与MC2通信信息Parser C化模块 #398
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 gcw_648Mce95 的贡献)8月4日 关联了issue:[Feature]补充Capture Stream 与 MC2 通信信息的 C++ Parser
atomgit-bot
8月4日 评论:
8月4日 评论:
变更摘要
此 PR 将 Capture Stream 与 MC2 通信信息的解析逻辑从 Python 迁移至 C++,主要包括新增 CaptureStreamInfoParser、Mc2CommInfoParser 两个 C++ 解析器及对应的 CaptureStreamInfoDumper、Mc2CommInfoDumper 持久化模块,同时将相关数据结构中的 stream id 类型从 uint16_t 扩展为 uint32_t 以避免大 stream id 截断和低位碰撞。在 KernelParserWorker 中通过芯片门控(IsCaptureStreamInfoSupported/IsMc2CommInfoSupported)接入 C++ 解析流程,并保留 Capture→MC2 补充映射与去重排序逻辑。Python 侧在 ConfigDataParsers 白名单中注册这两个解析器,当 C++ 启用时跳过 Python 回退,避免双写。
主要改动
- 新增
CaptureStreamInfoParser:实现 Capture V1/V2 二进制数据解析,通过文件名前缀自动判别版本,统一输出CaptureStreamInfoRecord,支持魔数校验和截断记录检测。 - 新增
Mc2CommInfoParser:解析 MC2 通信信息二进制数据,将commStreamIds数组以逗号拼接为字符串输出,并对streamSize超过MC2_COMM_STREAM_MAX_NUM(8)的异常记录拒绝处理。 - stream id 字段类型扩展:
CaptureStreamInfo::originalStreamId、MC2CommInfoData::aiCpuKfcStreamId、OriMc2InfoData中元组第一元素等从uint16_t改为uint32_t,overlap_analysis_processor中mc2StreamsTable和SepOneTask参数同步调整。 KernelParserWorker集成 Capture/MC2 流程:基于芯片平台版本门控启动解析与持久化;Capture 先于 Hash/TypeInfo 执行以保证RTAddInfoCenter能加载其 DB;解析失败仅标记错误但继续完成其余 Host 数据处理。- 新增
CaptureStreamInfoDumper与Mc2CommInfoDumper:前者实现按时间戳排序、去重、按 (deviceId, modelStreamId) 分配 batchId、检测 start/end modelId 不匹配;后者将 raw MC2 记录与 Capture 数据做originalStreamId→modelStreamId一对多补充映射后写入 SQLite。


不准确?
AtlasAccount
8月4日 评论:
8月4日 评论:
atomgit-bot
8月4日 评论:
8月4日 评论:
8月4日 添加了label:ascend-cla/no
此处折叠了509条消息 查看更多
10 天前 添加了label:lgtm
panyj1993
10 天前 评论:
10 天前 评论:
/approve


10 天前 添加了label:approved
10 天前 合入了pull request
ascend-robot
10 天前 评论:
10 天前 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


PR 合入模板
关联 Issue:#117
1. 修改描述
2. 功能验证
3. 分支合并要求
3. 代码检视
4. 安全自检
Python、C++
C++
5. 变更知会