Updating sequence to have isInit until init run

This commit is contained in:
Alejandro Saucedo 2021-02-09 19:19:39 +00:00
parent 650975838c
commit b34984b713
2 changed files with 13 additions and 11 deletions

View file

@ -58,6 +58,16 @@ Manager::~Manager()
return;
}
if (this->mManagedSequences.size()) {
SPDLOG_DEBUG("Kompute Manager explicitly running destructor for "
"managed sequences");
for (const std::pair<std::string, std::shared_ptr<Sequence>>& sqPair :
this->mManagedSequences) {
sqPair.second->freeMemoryDestroyGPUResources();
}
this->mManagedSequences.clear();
}
if (this->mManagedTensors.size()) {
SPDLOG_DEBUG("Kompute Manager explicitly freeing tensors");
for (const std::shared_ptr<Tensor>& tensor : this->mManagedTensors) {
@ -70,16 +80,6 @@ Manager::~Manager()
this->mManagedTensors.clear();
}
if (this->mManagedSequences.size()) {
SPDLOG_DEBUG("Kompute Manager explicitly running destructor for "
"managed sequences");
for (const std::pair<std::string, std::shared_ptr<Sequence>>& sqPair :
this->mManagedSequences) {
sqPair.second->freeMemoryDestroyGPUResources();
}
this->mManagedSequences.clear();
}
if (this->mFreeDevice) {
SPDLOG_INFO("Destroying device");
this->mDevice->destroy(