Renamed tensorcreate and started adding optensorsyncdevice
This commit is contained in:
parent
236c349aa0
commit
ec89fc6d56
17 changed files with 318 additions and 71 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#include "kompute/operations/OpAlgoBase.hpp"
|
||||
#include "kompute/operations/OpAlgoLhsRhsOut.hpp"
|
||||
#include "kompute/operations/OpMult.hpp"
|
||||
#include "kompute/operations/OpCreateTensor.hpp"
|
||||
#include "kompute/operations/OpTensorCreate.hpp"
|
||||
#include "kompute/operations/OpTensorCopy.hpp"
|
||||
#include "kompute/Algorithm.hpp"
|
||||
#include "kompute/Tensor.hpp"
|
||||
|
|
|
|||
|
|
@ -1509,10 +1509,10 @@ namespace kp {
|
|||
Operation that creates tensor and manages the memory of the components
|
||||
created
|
||||
*/
|
||||
class OpCreateTensor : public OpBase
|
||||
class OpTensorCreate : public OpBase
|
||||
{
|
||||
public:
|
||||
OpCreateTensor();
|
||||
OpTensorCreate();
|
||||
|
||||
/**
|
||||
* Default constructor with parameters that provides the bare minimum
|
||||
|
|
@ -1525,7 +1525,7 @@ class OpCreateTensor : public OpBase
|
|||
* @param tensors Tensors that will be used to create in operation.
|
||||
* @param freeTensors Whether operation manages the memory of the Tensors
|
||||
*/
|
||||
OpCreateTensor(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
|
||||
OpTensorCreate(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
|
||||
std::shared_ptr<vk::Device> device,
|
||||
std::shared_ptr<vk::CommandBuffer> commandBuffer,
|
||||
std::vector<std::shared_ptr<Tensor>> tensors);
|
||||
|
|
@ -1534,7 +1534,7 @@ class OpCreateTensor : public OpBase
|
|||
* Default destructor which in this case expects the parent class to free
|
||||
* the tensors
|
||||
*/
|
||||
~OpCreateTensor() override;
|
||||
~OpTensorCreate() override;
|
||||
|
||||
/**
|
||||
* In charge of initialising the primary Tensor as well as the staging
|
||||
|
|
@ -1544,8 +1544,10 @@ class OpCreateTensor : public OpBase
|
|||
void init() override;
|
||||
|
||||
/**
|
||||
* Records the copy command into the GPU memory from the staging or host
|
||||
* memory depending on the type of tensor.
|
||||
* Record runs the core actions to create the tensors. For device tensors
|
||||
* it records a copyCommand to move the data from the staging tensor to the
|
||||
* device tensor. For staging tensors it performs a mapDataIntoHostMemory
|
||||
* which would perform immediately as opposed to on sequence eval/submission.
|
||||
*/
|
||||
void record() override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue