!18957 [MS][LITE]fix bug of ir manager and tensorlist op infer

Merge pull request !18957 from mengyuanli/master
This commit is contained in:
i-robot 2021-06-28 03:13:51 +00:00 committed by Gitee
commit 961918f24f
3 changed files with 2 additions and 6 deletions

View File

@ -59,10 +59,6 @@ int TensorListSetItemInferShape(const TensorC *const *inputs, size_t inputs_size
}
int index = ((int *)(get_index->data_))[0];
if (index < 0 || (index >= ((int)(input0->element_num_)) && index != 0)) {
return NNACL_ERR;
}
output0->max_elements_num_ = input0->max_elements_num_;
if (input0->element_num_ == 0 && input0->element_shape_size_ == 0 && index == 0) {

View File

@ -35,7 +35,7 @@ int TensorListStackInferShape(const TensorC *const *inputs, size_t inputs_size,
return NNACL_INFER_INVALID;
}
if (input0->element_num_ == 0) {
return NNACL_ERR;
return NNACL_INFER_INVALID;
}
const TensorC *ele_shape = inputs[1]; // element shape
if (ele_shape->data_ == NULL) {

View File

@ -845,7 +845,7 @@ void FVTotalComputer::RealRecompute() {
continue;
}
auto curr = fg;
while (curr != p) {
while (curr != nullptr && curr != p) {
fv_total_analysis_[curr][iter.first] = iter.second;
curr = manager->parent(curr);
}