updated typos and misaligned types

This commit is contained in:
Alejandro Saucedo 2020-08-18 21:24:23 +01:00
parent 014f15d552
commit f8859c7fd6
4 changed files with 5 additions and 24 deletions

View file

@ -27,7 +27,7 @@ OpCreateTensor::init(std::shared_ptr<Tensor> tensor, std::vector<uint32_t> data)
if (tensor->tensorType() == Tensor::TensorTypes::eDevice) {
tensor->init(this->mPhysicalDevice, this->mDevice, this->mCommandBuffer);
this->mStagingTensor = std::make_unique<Tensor>(tensor->shape(), Tensor::TensorTypes::eStaging);
this->mStagingTensor = std::make_shared<Tensor>(tensor->shape(), Tensor::TensorTypes::eStaging);
this->mStagingTensor->init(this->mPhysicalDevice, this->mDevice, this->mCommandBuffer, data);

View file

@ -1,15 +0,0 @@
#pragma once
#include "BaseOp.hpp"
namespace kp {
class OpMult : BaseOp
{
private:
public:
OpMult();
virtual ~OpMult();
};
} // End namespace kp

View file

@ -7,15 +7,11 @@ Tensor::Tensor() {
this->mTensorType = TensorTypes::eDevice;
}
Tensor::Tensor(std::vector<uint32_t> shape, TensorTypes tensorType)
Tensor::Tensor(std::array<uint32_t, KP_MAX_DIM_SIZE> shape, TensorTypes tensorType)
{
SPDLOG_DEBUG("Kompute Tensor init with data");
if (shape.size() > KP_MAX_DIM_SIZE) {
spdlog::warn("Kompute Tensor created with more dimensions than supported. Max: {}, Provided: {}.", KP_MAX_DIM_SIZE, shape.size());
}
std::copy_n(shape.begin(), KP_MAX_DIM_SIZE, this->mShape.begin());
this->mShape = shape;
this->mTensorType = tensorType;
}

View file

@ -27,7 +27,7 @@ class Tensor
Tensor();
Tensor(std::vector<uint32_t> shape, TensorTypes tensorType = TensorTypes::eDevice);
Tensor(std::array<uint32_t, KP_MAX_DIM_SIZE> shape, TensorTypes tensorType = TensorTypes::eDevice);
~Tensor();
@ -39,7 +39,7 @@ class Tensor
// Getter functions
std::vector<uint32_t> data();
uint32_t size();
std::array<uint32_t, KP_MAX_DIM_SIZE> shape();
std::vector<uint32_t> shape();
TensorTypes tensorType();
bool isInit();