ComputationKernel Class Reference
HiCR
|
#include <computationKernel.hpp>

Classes | |
struct | tensorData_t |
Public Member Functions | |
ComputationKernel (const char *kernelName, const std::vector< tensorData_t > &inputs, const std::vector< tensorData_t > &outputs, const aclopAttr *kernelAttrs) | |
ComputationKernel (const char *kernelPath, const char *kernelName, const std::vector< tensorData_t > &inputs, const std::vector< tensorData_t > &outputs, const aclopAttr *kernelAttrs) | |
__INLINE__ void | start (const aclrtStream stream) override |
![]() | |
__INLINE__ | ~Kernel ()=default |
Static Public Member Functions | |
static tensorData_t | createTensorData (const std::shared_ptr< HiCR::LocalMemorySlot > &memorySlot, aclTensorDesc *tensorDescriptor) |
Detailed Description
This class represents a replicable Computation Kernel for the Ascend backend. A Computation Kernel enables the kernel execution in the HiCR runtime, and in particular enables the concatenation of kernel execution and memcpy operations in a common stream of operations.
Constructor & Destructor Documentation
◆ ComputationKernel() [1/2]
|
inline |
Constructor for the Computation Kernel unit class of the Ascend backend. This will not perform any model loading so this aspect should be handled manually (e.g., with aclopSetModelDir())
- Parameters
-
kernelName name of the kernel inputs kernel input tensor data descriptors outputs kernel output tensor data descriptors kernelAttrs kernel attributes
◆ ComputationKernel() [2/2]
|
inline |
Constructor for the Computation Kernel unit class of the Ascend backend. This will load an operator binary file located at the provided path with aclopLoad()
- Parameters
-
kernelPath path the the kernel .om file kernelName name of the kernel inputs kernel input tensor data descriptors outputs kernel output tensor data descriptors kernelAttrs kernel attributes
Member Function Documentation
◆ createTensorData()
|
inlinestatic |
Creates the Ascend-specific Tensor data to be used as input/output parameter to Ascend kernels
- Parameters
-
memorySlot The memory slot to be used as input/output tensorDescriptor Ascend-specific metadata about the passed memory slot
- Returns
- The new Ascend tensor data object
◆ start()
|
inlineoverridevirtual |
Start the kernel using the given ACL stream
- Parameters
-
stream the ACL stream on which the kernel is to be executed
Implements HiCR::backend::ascend::Kernel.
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/backends/ascend/computationKernel.hpp
Generated by