- RUNTIME_GetTensorDataInt32 符号求值防御性校验加固
- 精度工具产物output空目录修复
- RANGE 算子 支持DYN_SCALAR 动态值解析
- 日志规范
- view和assemble展开时,要和其他计算op一样,重置一下展开后logicaltensor的raw
- 展开view时,把自身的toDynValidshape属性切分到各个slice上


Pull Request has been successfully merged by CANN-robot.
(Thank you for dingbo929's contribution.)变更摘要
该 PR 聚焦解释器(interpreter)的近期修复与加固,主要涵盖:RUNTIME_GetTensorDataInt32 符号求值的防御性校验加固;RANGE 算子对 DYN_SCALAR 动态值的解析支持;日志体系的规范化重构(新增按文件输出的 LogToFile 与 INTERPRETER_LOGE_TO_FILE 宏,校验失败日志改写入 execDumpErrorFile);view/assemble 展开时重置展开后 LogicalTensor 的 raw,并将 view 自身的 toDynValidShape 属性切分到各 slice;同时新增/调整了相应单测用例。
主要改动
RUNTIME_GetTensorDataInt32求值防御性校验: 在symbolic_scalar_evaluate.cpp的EvaluateSymbolicCallRuntimeGetTensorDataInt32中新增FE_ASSERT校验:inoutDataPair非空、ioType仅允许 incast/outcast、下标越界检查以及数据视图非空,避免图变换后(ioType, ioTypeIndex)未重映射时越界/空指针取数。- RANGE 算子支持
DYN_SCALAR动态值: 在calc_vector.cpp的ExecuteOpRange中为tileIdx非具体值分支新增EvaluateOpImmediate动态解析路径,解析成功后据此计算curStart,扩展了动态 tile 场景的覆盖。 - 日志规范与按文件输出: 将
interpreter_log重构为WritePrefixedLine/WriteLineImpl结构并新增LogToFile及INTERPRETER_LOGE_TO_FILE宏;flow_verifier.cpp中校验失败日志由INTERPRETER_LOGE_FULL改为写入functionInterpreter_->execDumpErrorFile;config_manager.h新增IsLogRotationEnabled(),recorder.cpp仅在日志轮转启用时设置 verify 路径,修复精度工具 output 空目录问题。 - view/assemble 展开重置 raw 并切分
toDynValidShape:operation_impl.cpp的TiledAssembleRecursive/TiledViewOperationRecursive不再直接调用View(),而是构造新的LogicalTensor以重置展开后张量的 raw;slice 的 valid shape 改为基于 view 属性自身的toDynValidShape按 tile offset 切分计算。 - 单测更新: 在
test_expandfunction.cpp中新增ViewExpandSlicesToDynValidShape用例(校验各 slice 继承 view 的toDynValidShape)及ExpectSliceContractHaveDistinctRaws辅助校验(slice/contract 输入输出不共享同一RawTensor),并扩展Range用例覆盖动态 tile 求值场景。


Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| framework/src/interface/configs | ✅ tsungl4, 尹杰 (2/2) | ✅ tsungl4, 尹杰 (2/1) |
| framework/src/interface/interpreter | ✅ 尹杰, tsungl4 (2/2) | ✅ tsungl4, 尹杰 (2/1) |
| framework/src/interface/operation | ✅ tsungl4, 尹杰 (2/2) | ✅ tsungl4, 尹杰 (2/1) |
| framework/src/interface/program | ✅ tsungl4, 尹杰 (2/2) | ✅ tsungl4, 尹杰 (2/1) |
| framework/src/interface/tensor | ✅ 尹杰, tsungl4 (2/2) | ✅ 尹杰, tsungl4 (2/1) |
| repo-cann/pypto | ✅ tsungl4, 尹杰 (2/2) | ✅ tsungl4, 尹杰 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
dingbo929, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


/lgtm


/approve


/approve

