Removed OpCreateTensor in favour of manager memory ownership

This commit is contained in:
Alejandro Saucedo 2021-02-08 19:15:48 +00:00
parent bf401019c9
commit fc3d23d3f9
10 changed files with 64 additions and 168 deletions

View file

@ -229,8 +229,11 @@ Tensor::mapDataFromHostMemory()
if (this->mTensorType == TensorTypes::eHost) {
hostVisibleMemory = this->mPrimaryMemory;
} else {
} else if (this->mTensorType == TensorTypes::eDevice) {
hostVisibleMemory = this->mStagingMemory;
} else {
SPDLOG_WARN("Kompute Tensor mapping data not supported on storage tensor");
return;
}
vk::DeviceSize bufferSize = this->memorySize();
@ -252,8 +255,11 @@ Tensor::mapDataIntoHostMemory()
if (this->mTensorType == TensorTypes::eHost) {
hostVisibleMemory = this->mPrimaryMemory;
} else {
} else if (this->mTensorType == TensorTypes::eDevice) {
hostVisibleMemory = this->mStagingMemory;
} else {
SPDLOG_WARN("Kompute Tensor mapping data not supported on storage tensor");
return;
}
vk::DeviceSize bufferSize = this->memorySize();