Updated base compile functionality

This commit is contained in:
Alejandro Saucedo 2020-08-19 06:56:39 +01:00
parent 150e986982
commit 62d614b29f
3 changed files with 49 additions and 33 deletions

View file

@ -5,23 +5,27 @@
namespace kp {
OpCreateTensor::OpCreateTensor() {}
OpCreateTensor::OpCreateTensor() {
SPDLOG_DEBUG("Kompute OpCreateTensor constructor base");
}
OpCreateTensor::OpCreateTensor(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
std::shared_ptr<vk::Device> device,
std::shared_ptr<vk::CommandBuffer> commandBuffer)
: BaseOp(physicalDevice, device, commandBuffer)
{
SPDLOG_DEBUG("Kompute OpCreateTensor constructor with params");
}
OpCreateTensor::~OpCreateTensor() {
SPDLOG_DEBUG("Kompute OpCreateTensor destructor started");
}
void
OpCreateTensor::init(std::shared_ptr<Tensor> tensor, std::vector<uint32_t> data)
{
SPDLOG_DEBUG("Kompute OpCreateTensor init called");
this->mPrimaryTensor = tensor;
if (tensor->tensorType() == Tensor::TensorTypes::eDevice) {
@ -40,6 +44,8 @@ OpCreateTensor::init(std::shared_ptr<Tensor> tensor, std::vector<uint32_t> data)
void
OpCreateTensor::record()
{
SPDLOG_DEBUG("Kompute OpCreateTensor record called");
if (this->mPrimaryTensor->tensorType() == Tensor::TensorTypes::eDevice) {
this->mPrimaryTensor->recordCopyFrom(this->mStagingTensor);
}