Kompute
|
#include <OpTensorSyncDevice.hpp>
Public Member Functions | |
OpTensorSyncDevice (const std::vector< std::shared_ptr< Tensor >> &tensors) | |
~OpTensorSyncDevice () override | |
void | record (const vk::CommandBuffer &commandBuffer) override |
virtual void | preEval (const vk::CommandBuffer &commandBuffer) override |
virtual void | postEval (const vk::CommandBuffer &commandBuffer) override |
Public Member Functions inherited from kp::OpBase | |
virtual | ~OpBase () |
Operation that syncs tensor's device by mapping local data into the device memory. For TensorTypes::eDevice it will use a record operation for the memory to be syncd into GPU memory which means that the operation will be done in sync with GPU commands. For TensorTypes::eHost it will only map the data into host memory which will happen during preEval before the recorded commands are dispatched.
kp::OpTensorSyncDevice::OpTensorSyncDevice | ( | const std::vector< std::shared_ptr< Tensor >> & | tensors | ) |
Default constructor with parameters that provides the core vulkan resources and the tensors that will be used in the operation. The tensos provided cannot be of type TensorTypes::eStorage.
tensors | Tensors that will be used to create in operation. |
|
override |
Default destructor. This class does not manage memory so it won't be expecting the parent to perform a release.
|
overridevirtual |
Does not perform any postEval commands.
commandBuffer | The command buffer to record the command into. |
Implements kp::OpBase.
|
overridevirtual |
Does not perform any preEval commands.
commandBuffer | The command buffer to record the command into. |
Implements kp::OpBase.
|
overridevirtual |
For device tensors, it records the copy command for the tensor to copy the data from its staging to device memory.
commandBuffer | The command buffer to record the command into. |
Implements kp::OpBase.