Browse Source

!15031 modify adapter tensor size limit for master

From: @changzherui
Reviewed-by: @kingxian,@zhoufeng54
Signed-off-by: @kingxian
pull/15031/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
38c97d7daa
1 changed files with 0 additions and 5 deletions
  1. +0
    -5
      mindspore/ccsrc/transform/graph_ir/util.cc

+ 0
- 5
mindspore/ccsrc/transform/graph_ir/util.cc View File

@@ -173,11 +173,6 @@ GeTensorPtr TransformUtil::ConvertTensor(const MeTensorPtr &tensor, const std::s
return nullptr;
}
size_t elements_num = IntToSize(tensor->ElementsNum());
if (UINT_MAX / type_size < elements_num) {
MS_LOG(ERROR) << "The required Me Tensor data buff size " << elements_num << " x " << type_size
<< " overflowed UINT_MAX: " << UINT_MAX << ".";
return nullptr;
}

// get tensor buff size
size_t data_buff_size = elements_num * type_size;


Loading…
Cancel
Save