Closed
[Bug-Report|缺陷反馈]: 解决空指针报错问题 #3806
wangqun23Add on  19 days agoClosed at  15 days ago
wangqun23
wangqun23Collaborators
19 days ago Create

Describe the current behavior / 问题描述 (Mandatory / 必填)

具体原因

由于框架的修改,在Token开启的情况下,存在与Assemble输出同RawMagic的Incast不与其他op相连接的情况,目前仅限于Incast存在类似情况,即Incast游离在其他连接关系之外。导致ReplaceTensor里的map的value存储空指针,后续使用空指针导致段错误。

Environment / 环境信息 (Mandatory / 必填)

A3和A5 环境

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

python3 .opencode/skills/pypto-pass-whitebox-analysis/issues/test_Split_large_fanout_tensor_issue_new_3.py

Describe the expected behavior / 预期结果 (Mandatory / 必填)

python3 .opencode/skills/pypto-pass-whitebox-analysis/issues/test_Split_large_fanout_tensor_issue_new_3.py 12 精度正确

===== Bug-3 S3a-unroll2 (rc=1) =====
segment fault !!!
libtile_fwk_interface.so(npu::tile_fwk::Function::IsFromInCast(std::shared_ptrnpu::tile_fwk::LogicalTensor const&)+0x10) [0xfffdb4a3b1e0]
libtile_fwk_interface.so(npu::tile_fwk::ReplaceTensor::FindBaseTensor(npu::tile_fwk::Function&, std::unordered_map<std::shared_ptrnpu::tile_fwk::LogicalTensor, int, std::hash<std::shared_ptrnpu::tile_fwk::LogicalTensor >, std::equal_to<std::shared_ptrnpu::tile_fwk::LogicalTensor >, std::allocator<std::pair<std::shared_ptrnpu::tile_fwk::LogicalTensor const, int> > > const&, std::vector<std::shared_ptrnpu::tile_fwk::LogicalTensor, std::allocator<std::shared_ptr<npu::tile_fwk::LogicalTens
libtile_fwk_interface.so(npu::tile_fwk::ReplaceTensor::RunOnFunction(npu::tile_fwk::Function&)+0x3c8) [0xfffdb5675e58]
[S3a-unroll2] SEGFAULT 复现(编译期段错误)
===== Bug-3 S3b-waw2 (rc=1) =====
segment fault !!!
libtile_fwk_interface.so(npu::tile_fwk::Function::IsFromInCast(std::shared_ptrnpu::tile_fwk::LogicalTensor const&)+0x10) [0xfffdab2ed1e0]
libtile_fwk_interface.so(npu::tile_fwk::ReplaceTensor::FindBaseTensor(npu::tile_fwk::Function&, std::unordered_map<std::shared_ptrnpu::tile_fwk::LogicalTensor, int, std::hash<std::shared_ptrnpu::tile_fwk::LogicalTensor >, std::equal_to<std::shared_ptrnpu::tile_fwk::LogicalTensor >, std::allocator<std::pair<std::shared_ptrnpu::tile_fwk::LogicalTensor const, int> > > const&, std::vector<std::shared_ptrnpu::tile_fwk::LogicalTensor, std::allocator<std::shared_ptr<npu::tile_fwk::LogicalTens
libtile_fwk_interface.so(npu::tile_fwk::ReplaceTensor::RunOnFunction(npu::tile_fwk::Function&)+0x3c8) [0xfffdabf27e58]
[S3b-waw2] SEGFAULT 复现(编译期段错误)

Special notes for this issue/备注 (Optional / 选填)

likedislike
wangqun23wangqun23Collaborators
19 days ago Associated pull request
wangqun23wangqun23Collaborators
19 days ago Assign wangqun23 as responsible person
wangqun23wangqun23Collaborators
19 days ago Added label: Passes
wangqun23wangqun23Collaborators
19 days ago Modify description of issue
wangqun23wangqun23Collaborators
19 days ago Modify description of issue
wangqun23wangqun23Collaborators
19 days ago Modify description of issue
wangqun23wangqun23Collaborators
19 days ago Modify description of issue
wangqun23wangqun23Collaborators
15 days ago changed custom state from 待办的 to 进行中
wangqun23wangqun23Collaborators
15 days ago changed custom state from 进行中 to 已完成
wangqun23wangqun23Collaborators
15 days ago Close issue
CANN-robotCANN-robotCollaborators
15 days ago Added label: resolved
wangqun23wangqun23Collaborators
2 days ago Deleted associated pull request: fix(pass): Avoid null pointer errors.
wangqun23wangqun23Collaborators
2 days ago changed custom category from 任务 to 缺陷
wangqun23wangqun23Collaborators
2 days ago Change title to "[Bug-Report|缺陷反馈]: 解决空指针报错问题", originally titled "[Task|任务跟踪]: 解决空指针报错问题".
wangqun23wangqun23Collaborators
2 days ago Modify description of issue
wangqun23wangqun23Collaborators
2 days ago Modify description of issue
wangqun23wangqun23Collaborators
2 days ago Modify description of issue
wangqun23
wangqun23Collaborators
2 days ago Comments:

方案

针对map可能访问不存在的key做补充和校验。
对可能的空指针使用新增校验。

修复PR:https://gitcode.com/cann/pypto/pull/7445
同一缺陷Issue: https://gitcode.com/cann/pypto/issues/3809

likedislike