!6693 [MS][LITE][GPU]fix bug: run model shutdown

Merge pull request !6693 from chenzupeng/master-lite-2
This commit is contained in:
mindspore-ci-bot 2020-09-22 11:41:50 +08:00 committed by Gitee
commit 93d742732e
1 changed files with 4 additions and 0 deletions

View File

@ -321,6 +321,10 @@ int SubGraphOpenCLKernel::ReSize() { return RET_OK; }
int SubGraphOpenCLKernel::Run() {
for (auto &tensor : in_tensors_) {
if (tensor->data_c() == nullptr) {
MS_LOG(ERROR) << "OpenCL subgraph input tensor data is null";
return RET_ERROR;
}
allocator_->UnmapBuffer(tensor->data_c());
}