Base working compilation
This commit is contained in:
parent
5596b6f029
commit
7c3af1189f
8 changed files with 40 additions and 37 deletions
|
|
@ -13,7 +13,7 @@ OpCreateTensor::OpCreateTensor() {
|
|||
OpCreateTensor::OpCreateTensor(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
|
||||
std::shared_ptr<vk::Device> device,
|
||||
std::shared_ptr<vk::CommandBuffer> commandBuffer)
|
||||
: BaseOp(physicalDevice, device, commandBuffer)
|
||||
: OpBase(physicalDevice, device, commandBuffer)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute OpCreateTensor constructor with params");
|
||||
}
|
||||
|
|
@ -23,15 +23,17 @@ OpCreateTensor::~OpCreateTensor() {
|
|||
}
|
||||
|
||||
void
|
||||
OpCreateTensor::init(std::shared_ptr<Tensor> tensor, std::vector<uint32_t> data)
|
||||
OpCreateTensor::init(std::shared_ptr<Tensor> tensor, ...)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute OpCreateTensor init called");
|
||||
|
||||
this->mPrimaryTensor = tensor;
|
||||
std::vector<uint32_t> data = this->mPrimaryTensor->data();
|
||||
|
||||
if (tensor->tensorType() == Tensor::TensorTypes::eDevice) {
|
||||
tensor->init(this->mPhysicalDevice, this->mDevice, this->mCommandBuffer);
|
||||
|
||||
this->mStagingTensor = std::make_shared<Tensor>(tensor->shape(), Tensor::TensorTypes::eStaging);
|
||||
this->mStagingTensor = std::make_shared<Tensor>(tensor->data(), Tensor::TensorTypes::eStaging);
|
||||
|
||||
this->mStagingTensor->init(this->mPhysicalDevice, this->mDevice, this->mCommandBuffer, data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue