MemoryKernel Class Reference

HiCR: HiCR::backend::ascend::MemoryKernel Class Reference
HiCR
HiCR::backend::ascend::MemoryKernel Class Referencefinal

#include <memoryKernel.hpp>

Inheritance diagram for HiCR::backend::ascend::MemoryKernel:
HiCR::backend::ascend::Kernel

Public Member Functions

 MemoryKernel (ascend::CommunicationManager *commManager, std::shared_ptr< HiCR::LocalMemorySlot > destination, const size_t destinationOffset, std::shared_ptr< HiCR::LocalMemorySlot > source, const size_t sourceOffset, size_t size)
 
 ~MemoryKernel ()
 
__INLINE__ void start (const aclrtStream stream) override
 
- Public Member Functions inherited from HiCR::backend::ascend::Kernel
__INLINE__ ~Kernel ()=default
 

Detailed Description

This class represents a replicable Memory Kernel for the Ascend backend. A Memory Kernel enable the execution of memcopy operations in a stream/sequence of Kernels. Memory Kernels currently supports memcpy operations on the same device, since they are meant to be chained with other Kernels.

Constructor & Destructor Documentation

◆ MemoryKernel()

HiCR::backend::ascend::MemoryKernel::MemoryKernel ( ascend::CommunicationManager commManager,
std::shared_ptr< HiCR::LocalMemorySlot destination,
const size_t  destinationOffset,
std::shared_ptr< HiCR::LocalMemorySlot source,
const size_t  sourceOffset,
size_t  size 
)
inline

Constructor for the execution unit class of the Ascend backend

Parameters
commManagerthe Ascend communication manager
destinationdestination pointer
destinationOffsetdestination offset
sourcesource pointer
sourceOffsetsource offset
sizethe number of bytes to copy

◆ ~MemoryKernel()

HiCR::backend::ascend::MemoryKernel::~MemoryKernel ( )
inline

Default destructor

Member Function Documentation

◆ start()

__INLINE__ void HiCR::backend::ascend::MemoryKernel::start ( const aclrtStream  stream)
inlineoverridevirtual

Execute the memcpy on the stream . The operation is just enqueued on the stream, that is, it is async

Parameters
streamACL stream on which memcpy is executed

Implements HiCR::backend::ascend::Kernel.


The documentation for this class was generated from the following file: