Added baseline functionality including new memory models
This commit is contained in:
parent
9aae5d69db
commit
635fdb02be
22 changed files with 283 additions and 1919 deletions
|
|
@ -6,13 +6,16 @@
|
|||
namespace kp {
|
||||
|
||||
OpTensorSyncLocal::OpTensorSyncLocal(
|
||||
std::vector<std::shared_ptr<Tensor>> tensors)
|
||||
: OpBase(tensors, nullptr)
|
||||
const std::vector<std::shared_ptr<Tensor>>& tensors)
|
||||
{
|
||||
KP_LOG_DEBUG("Kompute OpTensorSyncLocal constructor with params");
|
||||
|
||||
this->mManagesTensors = false;
|
||||
this->mManagesAlgorithm = false;
|
||||
if (tensors.size() < 1) {
|
||||
throw std::runtime_error(
|
||||
"Kompute OpTensorSyncLocal called with less than 1 tensor");
|
||||
}
|
||||
|
||||
this->mTensors = tensors;
|
||||
}
|
||||
|
||||
OpTensorSyncLocal::~OpTensorSyncLocal()
|
||||
|
|
@ -20,25 +23,6 @@ OpTensorSyncLocal::~OpTensorSyncLocal()
|
|||
KP_LOG_DEBUG("Kompute OpTensorSyncLocal destructor started");
|
||||
}
|
||||
|
||||
void
|
||||
OpTensorSyncLocal::init(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
|
||||
std::shared_ptr<vk::Device> device)
|
||||
{
|
||||
KP_LOG_DEBUG("Kompute OpTensorSyncLocal init called");
|
||||
|
||||
if (this->mTensors.size() < 1) {
|
||||
throw std::runtime_error(
|
||||
"Kompute OpTensorSyncLocal called with less than 1 tensor");
|
||||
}
|
||||
|
||||
for (std::shared_ptr<Tensor> tensor : this->mTensors) {
|
||||
if (!tensor->isInit()) {
|
||||
throw std::runtime_error(
|
||||
"Kompute OpTensorSyncLocal: Tensor has not been initialized");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
OpTensorSyncLocal::record(std::shared_ptr<vk::CommandBuffer> commandBuffer)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue