Added tests to validate opcreatetensor components
This commit is contained in:
parent
782c9f4fe8
commit
8adb7ab49d
4 changed files with 283 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ Tensor::tensorType()
|
|||
bool
|
||||
Tensor::isInit()
|
||||
{
|
||||
return this->mIsInit;
|
||||
return this->mIsInit && this->mBuffer && this->mMemory;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -352,6 +352,7 @@ Tensor::freeMemoryDestroyGPUResources()
|
|||
} else {
|
||||
SPDLOG_DEBUG("Kompose Tensor destroying buffer");
|
||||
this->mDevice->destroy(*this->mBuffer);
|
||||
this->mBuffer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -362,6 +363,7 @@ Tensor::freeMemoryDestroyGPUResources()
|
|||
} else {
|
||||
SPDLOG_DEBUG("Kompose Tensor freeing memory");
|
||||
this->mDevice->freeMemory(*this->mMemory);
|
||||
this->mDevice = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue