[MSLITE]修复CAFFE权重文件不存在导致转换工具crash问题 #4

Open
p80627345 wants to merge 2 commits from p80627345/mindspore:master into master
First-time contributor

What does this PR do / why do we need it:

修复CAFFE权重文件不存在导致转换工具crash。

问题根因:ConverterFuncGraph::Build()内部调用Load3rdModelToFuncgraph(param)加载caffe模型失败,返回的func_graph指针为null,下方SetIsGraphDynamicShapeAttr(func_graph)未校验入参直接使用,解引用空指针导致crash。

解法:补充对Load3rdModelToFuncgraph(param)的输出func_graph判空,另外补充ut看护此场景。

Which issue(s) this PR fixes:

What does this PR do / why do we need it: 修复CAFFE权重文件不存在导致转换工具crash。 问题根因:ConverterFuncGraph::Build()内部调用Load3rdModelToFuncgraph(param)加载caffe模型失败,返回的func_graph指针为null,下方SetIsGraphDynamicShapeAttr(func_graph)未校验入参直接使用,解引用空指针导致crash。 解法:补充对Load3rdModelToFuncgraph(param)的输出func_graph判空,另外补充ut看护此场景。 Which issue(s) this PR fixes:
p80627345 added 2 commits 2023-03-25 11:34:01 +08:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b p80627345-master master
git pull master

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff p80627345-master
git push origin master
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mindspore-Ecosystem/mindspore#4
No description provided.