Further tests added to new structure
This commit is contained in:
parent
3f1288271d
commit
6378583a23
17 changed files with 636 additions and 514 deletions
|
|
@ -76,6 +76,15 @@ Tensor::tensorType()
|
|||
return this->mTensorType;
|
||||
}
|
||||
|
||||
bool
|
||||
Tensor::isInit() {
|
||||
return this->mDevice &&
|
||||
this->mPrimaryBuffer &&
|
||||
this->mPrimaryMemory &&
|
||||
this->mStagingBuffer &&
|
||||
this->mStagingMemory;
|
||||
}
|
||||
|
||||
void
|
||||
Tensor::setData(const std::vector<float>& data)
|
||||
{
|
||||
|
|
@ -429,7 +438,7 @@ Tensor::allocateBindMemory(std::shared_ptr<vk::Buffer> buffer,
|
|||
}
|
||||
|
||||
void
|
||||
Tensor::freeMemoryDestroyGPUResources()
|
||||
Tensor::destroy()
|
||||
{
|
||||
KP_LOG_DEBUG("Kompute Tensor started freeMemoryDestroyGPUResources()");
|
||||
|
||||
|
|
@ -495,6 +504,10 @@ Tensor::freeMemoryDestroyGPUResources()
|
|||
}
|
||||
}
|
||||
|
||||
if (this->mDevice) {
|
||||
this->mDevice = nullptr;
|
||||
}
|
||||
|
||||
KP_LOG_DEBUG("Kompute Tensor successful freeMemoryDestroyGPUResources()");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue