| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
add opensource code Co-authored-by: duanpengliang<duanpengliang@huawei.com> | 7 个月前 | |
【Profiling】so大小优化 Co-authored-by: c00699872<chenminghao11@hisilicon.com> # message auto-generated for no-merge-commit merge: !1826 merge so_optimize into master 【Profiling】so大小优化 Created-by: chenminghao11 Commit-by: c00699872 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> device侧+host侧libprofimpl so大小优化 protobuf解耦 host侧libascendprofhal so大小优化 helper流程删除 msprof ut冗余目录删除 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> NA ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 本地测试 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> NA ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/runtime!1826 | 4 个月前 | |
恢复沉睡测试,覆盖率 55.6% → 69.3% Co-authored-by: jinyingqi<jinyingqi@huawei.com> # message auto-generated for no-merge-commit merge: !2143 merge ut_recover into master 恢复沉睡测试,覆盖率 55.6% → 69.3% Created-by: jinyingqi Commit-by: jinyingqi Merged-by: cann-robot Description: # Pull Request ## 描述 【背景】msprof UT 模块存在三类沉睡测试:CMake 中注释掉的整文件、 源码中带 DISABLED_ 前缀的用例、以及虽存在但未挂载到任何 target 的 测试 .cpp。本次系统性恢复。 【挂载未编译测试到对应 target】 - common/test/ 12 个文件挂到 msprofiler_utest(singleton_test, queue_test, chunk_pool_test, thread_test, thread_pool_utest, ring_buffer_utest, config_manager_utest, local_socket_utest, utils_test, param_validation_utest, nano_json_test, argparse_utest),同步把 argparser.cpp 加入源列表并补 4 个 include path - job_wrapper/test/adx_prof_api_utest.cpp 挂到 job_wrapper - profapi/test/prof_api_c_utest.cpp 挂到 prof_api_utest 【恢复 CMake 中注释掉的整文件】 - stub_utest/test/msprof_err_mgr_utest.cpp (+1 case) - driver/test/ai_drv_api_utest.cpp (+37 cases) - msprof/test/msprof_reporter_utest.cpp (+19 cases) - msprof/test/prof_acl_core_utest.cpp (+102 cases,最大头) 【去掉 DISABLED_ 前缀,恢复可运行用例】 - MESSAGE_..FromObject - INPUT_PARSER_UTEST.PreCheckParamOffset(同步更新 ARGS_INVALID 哨兵值 63 → 67 以匹配当前 input_parser.h) - JOB_WRAPPER_PROF_HOST_CPU_JOB_TEST.Uninit - JOB_WRAPPER_PROF_CTRLCPU_JOB_TEST.PrepareDataDir - JSON_PARSER_JSON_NANO_UTEST.JsonParserInitWithCann/Device (修了缺逗号的非法 JSON + 改用当前目录的临时文件路径) 【适配 prof_acl_core_utest.cpp 编译错误】 - ParseTsKeypointData 22 处签名调整:(CONST_CHAR_PTR)(&data), sizeof(data) → &data(新签名是 template void ParseTsKeypointData(const T *tsData)) - 已删除的 ProfStartAscendProfHalTask/ProcessHelperHostConfig: 清空相关测试 body 改 DISABLED_,其他测试中相关 MOCKER_CPP 段移除 - 已删除的 oldSigHandler/RegisterSiganlHandler:标 DISABLED_RegisterSignalHandlerTwice(sigint_handler_utest.cpp 已覆盖等价行为) - CanonicalizePath 字面量用 std::string 包裹,绕过 mockcpp IsEqual 数组类型推导问题 【关键 trick:prof_acl_core_utest.cpp 在 CMake 源列表中放最后】 gtest 按 TEST_F 静态注册顺序运行;放最后避免其 ProfReporterMgr 线程状态污染前面的 sigint/dynamic 套件。此前同样代码放中间时, DynProfThread_StopAfterDelay 等后续测试会段错。 【单独 DISABLED 不稳定用例(22 个)】 - 段错/超时类(线程竞争或全局状态污染):acl_ge_api, acl_api, acl_api_subscribe, ge_api_subscribe, acl_json, PureCpu, init_env, InitApiCtrlUploaderHelper, MsprofInitHelper, MsprofInitPureCpu, acl_api_subscribe_fail, ProfAclStartMultiDevice, ProfStartAscendProfHalTask, _Helper, ProcessHelperHostConfig, RegisterSignalHandlerTwice - EXPECT 不匹配类(API 校验行为变化):ge_option, EnableRpcHelperMode, MsprofInitAclJson, ReporterData, MsprofStart_Common, _AclApi, Msprof_aclprofGetSupportedFeatures 【适配性微调】 - driver/test/ai_drv_api_utest.cpp:移除 4 处不安全的 MOCKER(malloc)(mockcpp 在当前工具链下钩住 malloc 会段错), 简化 DrvProfFlush mock - msprof/test/msprof_reporter_utest.cpp:简化 SetUp/TearDown, 给 GetHashIdTest 补 IsInited mock - msprof/test/sigint_handler_utest.cpp 加 SetUp 内 UnInit() 重置 ProfAclMgr 单例状态,避免新启用用例污染 sigint 测试 - common/test/chunk_pool_test.cpp:去掉 MOCKER(malloc) 段(同上) - job_wrapper/test/adx_prof_api_utest.cpp:MOCKER(free) 替换为 真 malloc 分配,避免 mockcpp 钩住 free 段错 - profapi/test/prof_api_c_utest.cpp:放宽对 MsprofSysCycleTime 的 零值期望(依赖 host CPU 计数器) 【保留无法恢复的禁用项】 - CMake 注释保留:driver/data_handle_utest.cpp(fragment 无 #include);profhal/hal_server_utest(ProfHdcServer/ ProfHelperServer/helperDevMap_ 已删);job_wrapper/ prof_device_rpc_utest(拉入 MsprofManager 整链);streamio/ epoll_operation_test(源头 epoll_operation.h 不存在);msprof/ test 下 adx_prof_api_utest/devprof_drv_utest/msprof_utest/ adprof_utest(AdxIdeSock/AicpuReportHdc/WaitBufferEmptyEvent 等 API 已全部删除) 【数据】 - 测试用例:~931 → 1251(+320) - 行覆盖率:59.6% → 69.3%(+9.7pp) - 函数覆盖:67.2% → 74.7%(+7.5pp) - 分支覆盖:31.4% → 37.9%(+6.5pp) - 失败用例:0 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 See merge request: cann/runtime!2143 | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 7 个月前 | ||
| 4 个月前 | ||
| 3 个月前 |