Removed OpCreateTensor in favour of manager memory ownership
This commit is contained in:
parent
bf401019c9
commit
fc3d23d3f9
10 changed files with 64 additions and 168 deletions
|
|
@ -58,6 +58,17 @@ Manager::~Manager()
|
|||
return;
|
||||
}
|
||||
|
||||
if (this->mManagedTensors.size()) {
|
||||
SPDLOG_DEBUG("Kompute Manager explicitly freeing tensors");
|
||||
for (const std::shared_ptr<Tensor>& tensor : this->mManagedTensors) {
|
||||
if (!tensor->isInit()) {
|
||||
SPDLOG_ERROR("Kompute Manager attempted to free managed tensor but not tensor is not initialised");
|
||||
}
|
||||
tensor->freeMemoryDestroyGPUResources();
|
||||
}
|
||||
this->mManagedTensors.clear();
|
||||
}
|
||||
|
||||
if (this->mManagedSequences.size()) {
|
||||
SPDLOG_DEBUG("Kompute Manager explicitly running destructor for "
|
||||
"managed sequences");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue