llama-cpp-turboquant/src/OpMult.cpp
Alejandro Saucedo 0d18dc50e6 Reformatted
2020-08-20 05:45:54 +01:00

46 lines
950 B
C++

#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");
}
}