| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
refactor: 收敛memMng公共方法到runtime并聚类UVM Co-authored-by: kongrong<kongrong@hisilicon.com> # message auto-generated for no-merge-commit merge: !4955 merge refactor/api-uvm-runtime-convergence into master refactor: 收敛memMng公共方法到runtime并聚类UVM Created-by: carol696 Commit-by: kongrong Merged-by: cann-robot Description: # Pull Request ## 描述 从 #4909 中抽取 UVM 相关的公共方法收敛和文件归位改动,不引入 ApiUvm/ApiImplUvm 框架代码。 本 PR 主要包含: - 将 ApiImpl::GetDeviceCount 和 ApiImpl::GetDevice 的主体逻辑收敛到 Runtime 公共方法,主 API 侧保留委托调用。 - 将 profiler 内存 extInfo 填充公共逻辑收敛到 Runtime,保持上报字段和设备号转换逻辑一致。 - 将 rtMemAllocManaged / rtMemFreeManaged C 入口移动到 api_c_uvm.cc。 - 将 ManagedMemAlloc / ManagedMemFree 实现移动到 api_impl_uvm.cc,使 UVM C 入口和实现集中在 UVM 文件。 本 PR 不修改 CMake,不新增 UVM 框架类,不切换 UVM 调用链到新组件。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. bash tests/build_ut.sh --ut=runtime --target=runtime_utest_api:构建成功,runtime_utest_api.xml 显示 593 tests / 0 failures / 0 errors。 2. build/tests/ut/runtime/runtime/runtime_utest_api --gtest_filter='ProfilerTest.ApiProfileDecoratorMemCopySyncExtInfo:ProfilerTest.ApiProfileDecoratorMemCopySyncFailedNoExtInfo:ProfilerTest.RuntimeProfileMemcpyExtInfoUsesCurrentDeviceId:ProfilerTest.RuntimeGetCurrentDeviceIdMatchesRtGetDevice:ProfilerTest.RuntimeProfileDeviceIdOverflow:ProfilerTest.ApiProfileDecoratorMemSetSyncExtInfo:ProfilerTest.ApiProfileDecoratorMemSetSyncFailedNoExtInfo:ProfilerTest.ApiProfileDecoratorDevMallocExtInfo:ProfilerTest.ApiProfileDecoratorDevMallocFailedNoExtInfo:ProfilerTest.ApiProfileDecoratorDevFreeExtInfo:ProfilerTest.ApiProfileDecoratorMemMngMemoryTypeExtInfo:ProfilerTest.ApiProfileDecoratorSetMemcpyDescExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyBatchSingleKindExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyBatchMultiKindExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyBatchAsyncStreamId:ProfilerTest.ApiProfileDecoratorMemcpyBatchCopyKindBranches:ProfilerTest.ApiProfileDecoratorMemoryWrappersFillExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyAndMemsetWrappersFillExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyBatchWrappersFillExtInfo':19 tests passed。 3. git -c core.whitespace=cr-at-eol diff --check:通过。 4. rg 扫描确认 UVM C 入口和 ApiImpl 实现均集中在 api_c_uvm.cc / api_impl_uvm.cc。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 本 PR 从 #4909 抽取窄范围改动,避免引入框架代码。 - 已确认未修改 CMake 文件,未做无关行尾转换;原代码注释已保留在迁移后位置。 See merge request: cann/runtime!4955 | 3 天前 | |
refactor: 新增 ApiDeviceTopology 框架 Co-authored-by: wangzhensheng<wangzhensheng4@huawei.com> # message auto-generated for no-merge-commit merge: !4874 merge refactor/api-device-topology-framework into master refactor: 新增 ApiDeviceTopology 框架 Created-by: wangzhensheng Commit-by: wangzhensheng Merged-by: cann-robot Description: # Pull Request ## 描述 新增独立的 ApiDeviceTopology 框架,将设备 P2P 和设备拓扑查询能力从通用 ApiImpl 的职责中抽离,为后续调用入口迁移做准备。 当前PR仅新增了新框架、实现及 Runtime 生命周期接入,并未切换新框架;原有接口语义、逻辑、调用链仍维持原状。 **主要变更** 1. 新增 ApiDeviceTopology 抽象接口,包含 6 个方法: - EnableP2P - DisableP2P - DeviceCanAccessPeer - GetP2PStatus - GetPairDevicesInfo - GetPairPhyDevicesInfo 2. 新增标准平台实现 ApiImplDeviceTopology: - EnableP2P、DisableP2P:将目标用户设备 ID 转换为驱动设备 ID,校验目标设备和源物理设备 ID,然后调用 NpuDriver。 - DeviceCanAccessPeer:校验设备 ID、输出指针、芯片 P2P 特性和运行模式;离线模式或芯片不支持 P2P 时返回 RT_ERROR_FEATURE_NOT_SUPPORT。 - GetP2PStatus:校验设备 ID、输出指针和当前 Context,再通过驱动查询 P2P 状态。 - GetPairDevicesInfo:查询两个逻辑设备的拓扑信息,两个设备 ID 都会转换为驱动设备 ID。 - GetPairPhyDevicesInfo:直接按物理设备 ID 查询,不进行逻辑设备 ID 转换。 3. 增加平台 Stub 实现: api_impl_device_topology_stub.cc 只提供框架所需符号: - IsImplDeviceTopologySupported() 返回 false - CreateImplDeviceTopologyAndGet() 返回 nullptr - DestroyImplDeviceTopology() 仅清空指针 4. 接入 Runtime 生命周期: - 新增 ApiDeviceTopology::Instance()。 - RuntimeIntf 增加 ApiDeviceTopology_() 虚接口。 - Runtime 增加 apiDeviceTopology_ 和 apiImplDeviceTopology_。 - Runtime::InitApiImplies() 按平台能力创建实现对象。 - 初始化成功后,将实现挂载到 apiDeviceTopology_。 - 初始化失败以及 v100/v200 Runtime 析构时释放实现对象。 **平台构建策略** - 完整实现:标准 v100、v200/v201、CModel。 - Stub 实现:tiny、arch5162。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/runtime!4874 | 3 天前 | |
【fix】: arch5162编译时so问题修复 Co-authored-by: kongrong<kongrong@hisilicon.com> # message auto-generated for no-merge-commit merge: !4797 merge master into master 【fix】: arch5162编译时so问题修复 Created-by: carol696 Commit-by: kongrong Merged-by: cann-robot Description: # Pull Request ## 描述 arch5162编译时需注册默认的libruntime_v100.so,并修复了platform.cmake中的问题。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/runtime!4797 | 8 天前 | |
refactor: 收敛memMng公共方法到runtime并聚类UVM Co-authored-by: kongrong<kongrong@hisilicon.com> # message auto-generated for no-merge-commit merge: !4955 merge refactor/api-uvm-runtime-convergence into master refactor: 收敛memMng公共方法到runtime并聚类UVM Created-by: carol696 Commit-by: kongrong Merged-by: cann-robot Description: # Pull Request ## 描述 从 #4909 中抽取 UVM 相关的公共方法收敛和文件归位改动,不引入 ApiUvm/ApiImplUvm 框架代码。 本 PR 主要包含: - 将 ApiImpl::GetDeviceCount 和 ApiImpl::GetDevice 的主体逻辑收敛到 Runtime 公共方法,主 API 侧保留委托调用。 - 将 profiler 内存 extInfo 填充公共逻辑收敛到 Runtime,保持上报字段和设备号转换逻辑一致。 - 将 rtMemAllocManaged / rtMemFreeManaged C 入口移动到 api_c_uvm.cc。 - 将 ManagedMemAlloc / ManagedMemFree 实现移动到 api_impl_uvm.cc,使 UVM C 入口和实现集中在 UVM 文件。 本 PR 不修改 CMake,不新增 UVM 框架类,不切换 UVM 调用链到新组件。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 描述测试此变更的步骤和前提条件: 1. bash tests/build_ut.sh --ut=runtime --target=runtime_utest_api:构建成功,runtime_utest_api.xml 显示 593 tests / 0 failures / 0 errors。 2. build/tests/ut/runtime/runtime/runtime_utest_api --gtest_filter='ProfilerTest.ApiProfileDecoratorMemCopySyncExtInfo:ProfilerTest.ApiProfileDecoratorMemCopySyncFailedNoExtInfo:ProfilerTest.RuntimeProfileMemcpyExtInfoUsesCurrentDeviceId:ProfilerTest.RuntimeGetCurrentDeviceIdMatchesRtGetDevice:ProfilerTest.RuntimeProfileDeviceIdOverflow:ProfilerTest.ApiProfileDecoratorMemSetSyncExtInfo:ProfilerTest.ApiProfileDecoratorMemSetSyncFailedNoExtInfo:ProfilerTest.ApiProfileDecoratorDevMallocExtInfo:ProfilerTest.ApiProfileDecoratorDevMallocFailedNoExtInfo:ProfilerTest.ApiProfileDecoratorDevFreeExtInfo:ProfilerTest.ApiProfileDecoratorMemMngMemoryTypeExtInfo:ProfilerTest.ApiProfileDecoratorSetMemcpyDescExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyBatchSingleKindExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyBatchMultiKindExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyBatchAsyncStreamId:ProfilerTest.ApiProfileDecoratorMemcpyBatchCopyKindBranches:ProfilerTest.ApiProfileDecoratorMemoryWrappersFillExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyAndMemsetWrappersFillExtInfo:ProfilerTest.ApiProfileDecoratorMemcpyBatchWrappersFillExtInfo':19 tests passed。 3. git -c core.whitespace=cr-at-eol diff --check:通过。 4. rg 扫描确认 UVM C 入口和 ApiImpl 实现均集中在 api_c_uvm.cc / api_impl_uvm.cc。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 本 PR 从 #4909 抽取窄范围改动,避免引入框架代码。 - 已确认未修改 CMake 文件,未做无关行尾转换;原代码注释已保留在迁移后位置。 See merge request: cann/runtime!4955 | 3 天前 | |
fix: 调整 Page Fault 信息清理时机 Co-authored-by: lianglongzi8622<lianglongzi@huawei.com> # message auto-generated for no-merge-commit merge: !4841 merge fix/pagefault-clear-on-resume into master fix: 调整 Page Fault 信息清理时机 Created-by: lianglongzi8622 Commit-by: lianglongzi8622 Merged-by: cann-robot Description: # Pull Request ## 描述 修正 PR 4096 引入的 Page Fault 信息清理时机:ClearPageFaultInfo 不再由 DeviceTaskAbort 直接调用,而是收敛到恢复流程完成后执行。 - A5:在 DeviceTaskSendResume 中、ResumeSqSend 成功后清理。 - A2/A3:在 DeviceClean 中、StreamsUpdate 恢复完成后清理。 - ClearPageFaultInfo 增加 isLogError 参数,恢复路径失败按 WARNING 记录,任务报错采集路径保持默认 ERROR。 - 修复 GetUbMemcpyFlag 的 G.CNS.04-CPP 告警,将只读 stm 参数调整为 const Stream* const。 ## 变更类型 - [x] Bug 修复 - [x] 代码风格更新(const 修饰) - [ ] 新功能 - [ ] 重构 - [ ] 构建过程或辅助工具变动 - [ ] 文档更新 ## 关联背景 PR 4096:Page Fault 诊断信息查询与清理。 ## 如何测试 - 补充 A5 回归用例,验证 ClearPageFaultInfo 在 ABORT_POST 和 ResumeSqSend 成功后调用。 - 补充 A2/A3 回归用例,验证 ClearPageFaultInfo 在 StreamsUpdate 完成后调用。 - 补充 isLogError 日志级别用例,覆盖 WARNING 和 ERROR。 - 本地 Windows 环境缺少 CMake/C++ 工具链,未实际编译运行 UT,待 CI 验证。 ## 核对清单 - [x] 代码遵循项目现有风格 - [x] PR 仅包含预期修复提交 - [x] 标题使用 fix 类型标签 - [ ] 已在本地运行 UT See merge request: cann/runtime!4841 | 4 天前 | |
【PR】: refactor: 拆分 Software Event 通用实现并解耦捕获状态判断 Co-authored-by: duanpengliang<duanpengliang@huawei.com> # message auto-generated for no-merge-commit merge: !4919 merge aclgraph-context-decouple-pr5 into master 【PR】: refactor: 拆分 Software Event 通用实现并解耦捕获状态判断 Created-by: duanpengliang Commit-by: duanpengliang Merged-by: cann-robot Description: # Pull Request ## 描述 详细修改描述: 1. 拆分 Software Event 通用实现 将以下通用方法从 ACLGraph feature 的 event_capture.cc 移到 Core 新文件 event_software.cc: RecordSoftwareEvent CaptureWaitProcess ExternalEventWaitProcess ResetSoftwareEvent tiny/arch5162 不编译正式实现,使用 Core 下新增的 event_software_stub.cc。同步调整 runtime、v200、cmodel、tiny、arch5162 和 UT 构建列表。 这一部分主要是代码位置迁移,函数主体逻辑保持不变。 2. Event 捕获状态不再依赖 CaptureModel Event::IsCapturing() 从: GetCaptureModel() != nullptr && captureModel->IsCapturing() 调整为: eventFlag_ != RT_EVENT_EXTERNAL && captureEvent_ != nullptr Event::ToBeCaptured() 从查询 CaptureModel 状态调整为直接查询传入 Stream 的捕获状态: eventFlag_ != RT_EVENT_EXTERNAL && stm->IsCapturing() 补充 UT,覆盖: - External Event 始终不进入捕获状态。 - 普通 Event 根据 captureEvent_ 判断捕获状态。 - ToBeCaptured() 对 Stream 的 NONE、ACTIVE 和 INVALIDATED 状态判断。 这一部分存在有意的语义调整:Event 捕获状态由 Event/Stream 自身状态表达,不再反向读取 CaptureModel。 3. 删除 Event::GetCaptureModel() 删除 Event 头文件和不同平台实现中的 GetCaptureModel(),避免 Core Event 直接依赖 ACLGraph 的 CaptureModel 类型。 原来 Event 销毁时由 Core 直接执行: event->GetCaptureModel(); captureModel->DeleteSingleOperEvent(event); 现在改为通过 CaptureOps::detachCaptureEvent 回调进入 ACLGraph feature,由 DetachCaptureEvent() 完成: 根据 captureEvent_ 找到 CaptureModel 从 singleOperEvents_ 删除用户 Event 清空用户 Event 的 captureEvent_ TerminateCapture() 中原来调用 Event::GetCaptureModel() 的位置也改为使用 feature 内部辅助函数。 4. 补齐 CaptureModel 析构清理 发现 CaptureModel 直接析构时,只销毁内部 capture Event,没有清除用户 Event 保存的 captureEvent_,会遗留悬空指针。 现在析构时先执行: for (Event* const evt : singleOperEvents_) { evt->SetCaptureEvent(nullptr); } singleOperEvents_.clear(); 然后再销毁内部 capture Event。 正常 EndCapture 已经通过 ExitCaptureNotify() 清理这些映射,因此正常流程不变;新增逻辑只补齐异常清理或直接析构路径。David UT 增加断言,确保 Model 析构后用户 Event 的捕获映射为空。 整体变更规模: 25 个文件 新增 290 行 删除 225 行 验证结果: EventTestDavid:60/60 通过 runtime_utest_task_david:612/612 通过 未跟踪的 docs/aclgraph/、stream_capture_state.* 等文件不属于这 3 个提交。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 源码、ut编译通,aclgraph用例执行无问题 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/runtime!4919 | 3 天前 | |
【PR】: runtime support launch blocking Co-authored-by: nevermore_t<tianjingxuan2@huawei.com> Co-authored-by: x00508183<xiachanglin@huawei.com> Co-authored-by: jiaxingru<jiaxingru1@huawei.com> # message auto-generated for no-merge-commit merge: !4247 merge feature/launch-blocking into master 【PR】: runtime support launch blocking Created-by: xiachanglin Commit-by: x00508183;jiaxingru;nevermore_t Merged-by: cann-robot Description: # Pull Request ## 描述 本需求提供一种面向调试场景的 blocking launch 能力,使用户在启动程序前设置环境变量后,Runtime 将纳入范围的 kernel/model launch 从“下发后立即返回”改为“下发后等待执行完成再返回”。这样执行错误在当前 launch API 返回,帮助用户定位问题算子。 新增环境变量: ASCEND_RT_LAUNCH_BLOCKING,默认不打开该环境变量时,Runtime 保持原有异步 launch 行为。当 ASCEND_RT_LAUNCH_BLOCKING=1 Runtime 对纳入范围的 kernel/model launch 执行做如下增强: 1. 先按原有流程完成任务下发。 2. 如果任务下发失败,直接返回原 launch 错误,不额外同步。 3. 如果任务下发成功,根据 stream 状态、no-blocking 逃生状态和环境变量判断是否需要同步。 4. 需要同步时,等待该 stream 当前已下发任务执行完成,再从当前 launch API 返回。 该功能的目标是调试定位。 涉及API: aclrtLaunchKernel、aclrtLaunchKernelWithConfig、aclrtLaunchKernelV2 aclrtLaunchKernelWithHostArgs、aclrtLaunchKernelWithArgsArray 、aclrtLaunchSIMTKernelWithArgsArray、aclrtLaunchSIMTKernelWithHostArgs aclmdlRIExecuteAsync ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> https://gitcode.com/cann/runtime/issues/921 ## 如何测试 描述测试此变更的步骤和前提条件: 1. UT 2. ST 3. rdv ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/runtime!4247 | 11 天前 | |
【PR】: fix error log magic number Co-authored-by: duanpengliang<duanpengliang@huawei.com> Co-authored-by: zhangpengpeng8<zhangpengpeng8@hisilicon.com> # message auto-generated for no-merge-commit merge: !4417 merge master_mv_pkginc_to_include into master 【PR】: fix error log magic number Created-by: duanpengliang Commit-by: duanpengliang;zhangpengpeng8 Merged-by: cann-robot Description: # Pull Request ## 描述 整改 Runtime/ACL ERROR 日志枚举魔鬼数字,统一输出“枚举字符串(数字)”;非法值使用 UNKNOWN(数字),连续范围边界保留数字。精简枚举转换实现以控制 tiny 包体积,并补充相关 UT 覆盖及 pre-commit 校验。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: ut源码编译通过,error日志无枚举对应的魔鬼数字 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/runtime!4417 | 21 天前 |