Updated init parameter to be tensor vector
This commit is contained in:
parent
90ea083cba
commit
8aa7843f0e
7 changed files with 108 additions and 16 deletions
46
src/OpMult.cpp
Normal file
46
src/OpMult.cpp
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
|
||||
#include "Tensor.hpp"
|
||||
|
||||
#include "OpMult.hpp"
|
||||
|
||||
namespace kp {
|
||||
|
||||
OpMult::OpMult() {
|
||||
SPDLOG_DEBUG("Kompute OpMult constructor base");
|
||||
|
||||
}
|
||||
|
||||
OpMult::OpMult(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
|
||||
std::shared_ptr<vk::Device> device,
|
||||
std::shared_ptr<vk::CommandBuffer> commandBuffer)
|
||||
: OpBase(physicalDevice, device, commandBuffer)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute OpMult constructor with params");
|
||||
}
|
||||
|
||||
OpMult::~OpMult() {
|
||||
SPDLOG_DEBUG("Kompute OpMult destructor started");
|
||||
}
|
||||
|
||||
void
|
||||
OpMult::init(std::vector<std::shared_ptr<Tensor>> tensors)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute OpMult init called");
|
||||
|
||||
if (tensors.size() < 2) {
|
||||
throw std::runtime_error("Kompute OpMult called with less than 1 tensor");
|
||||
} else if (tensors.size() > 2) {
|
||||
spdlog::warn("Kompute OpMult called with more than 2 tensor");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
OpMult::record()
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute OpMult record called");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue