forked from mindspore-Ecosystem/mindspore
bug fix
This commit is contained in:
parent
0971a33fcb
commit
1fdfa30dbd
|
@ -183,13 +183,17 @@ void PackWeightManager::Free(void *tensor_data) {
|
||||||
|
|
||||||
void PackWeightManager::FreePackWeight(std::vector<char *> model_bufs) {
|
void PackWeightManager::FreePackWeight(std::vector<char *> model_bufs) {
|
||||||
#ifdef SHARING_MODEL_WEIGHT
|
#ifdef SHARING_MODEL_WEIGHT
|
||||||
pack_weight_->FreePackWeight(model_bufs, false);
|
if (pack_weight_ != nullptr) {
|
||||||
|
pack_weight_->FreePackWeight(model_bufs, false);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
void PackWeightManager::DeleteOriginModelBufInfo(const char *model_buf) {
|
void PackWeightManager::DeleteOriginModelBufInfo(const char *model_buf) {
|
||||||
#ifdef SHARING_MODEL_WEIGHT
|
#ifdef SHARING_MODEL_WEIGHT
|
||||||
pack_weight_->DeleteOriginModelBufInfo(model_buf);
|
if (pack_weight_ != nullptr) {
|
||||||
|
pack_weight_->DeleteOriginModelBufInfo(model_buf);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue