ComputeManager Class Reference

HiCR: HiCR::backend::ascend::ComputeManager Class Reference
HiCR
HiCR::backend::ascend::ComputeManager Class Referencefinal

#include <computeManager.hpp>

Inheritance diagram for HiCR::backend::ascend::ComputeManager:
HiCR::ComputeManager

Public Member Functions

 ComputeManager ()
 
 ~ComputeManager () override=default
 
__INLINE__ std::shared_ptr< HiCR::ExecutionUnitcreateExecutionUnit (const std::vector< std::shared_ptr< ascend::Kernel > > &kernelOperations)
 
__INLINE__ std::unique_ptr< HiCR::ExecutionStatecreateExecutionState (std::shared_ptr< HiCR::ExecutionUnit > executionUnit, void *const argument=nullptr) const override
 
__INLINE__ std::unique_ptr< HiCR::ProcessingUnitcreateProcessingUnit (std::shared_ptr< HiCR::ComputeResource > resource) const override
 
- Public Member Functions inherited from HiCR::ComputeManager
virtual std::unique_ptr< HiCR::ProcessingUnitcreateProcessingUnit (std::shared_ptr< HiCR::ComputeResource > resource) const =0
 
virtual std::unique_ptr< HiCR::ExecutionStatecreateExecutionState (std::shared_ptr< HiCR::ExecutionUnit > executionUnit, void *const argument=nullptr) const =0
 
__INLINE__ void initialize (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)
 
__INLINE__ void start (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit, std::unique_ptr< HiCR::ExecutionState > &executionState)
 
__INLINE__ void suspend (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)
 
__INLINE__ void resume (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)
 
__INLINE__ void terminate (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)
 
__INLINE__ void await (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)
 

Protected Member Functions

__INLINE__ void initializeImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) override
 
__INLINE__ void startImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit, std::unique_ptr< HiCR::ExecutionState > &executionState) override
 
__INLINE__ void suspendImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) override
 
__INLINE__ void resumeImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) override
 
__INLINE__ void terminateImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) override
 
__INLINE__ void awaitImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) override
 
- Protected Member Functions inherited from HiCR::ComputeManager
virtual void initializeImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0
 
virtual void startImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit, std::unique_ptr< HiCR::ExecutionState > &executionState)=0
 
virtual void suspendImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0
 
virtual void resumeImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0
 
virtual void terminateImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0
 
virtual void awaitImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0
 

Detailed Description

Implementation of the HiCR Ascend backend compute manager.

It stores the processing units detected by Ascend Computing Language.

Constructor & Destructor Documentation

◆ ComputeManager()

HiCR::backend::ascend::ComputeManager::ComputeManager ( )
inline

Constructor for the Compute Manager class for the Ascend backend

◆ ~ComputeManager()

HiCR::backend::ascend::ComputeManager::~ComputeManager ( )
overridevirtualdefault

Default destructor

Reimplemented from HiCR::ComputeManager.

Member Function Documentation

◆ awaitImpl()

__INLINE__ void HiCR::backend::ascend::ComputeManager::awaitImpl ( std::unique_ptr< HiCR::ProcessingUnit > &  processingUnit)
inlineoverrideprotected

Internal implementation of awaitImpl

Parameters
processingUnitthe processing unit to operate on

◆ createExecutionState()

__INLINE__ std::unique_ptr< HiCR::ExecutionState > HiCR::backend::ascend::ComputeManager::createExecutionState ( std::shared_ptr< HiCR::ExecutionUnit executionUnit,
void *const  argument = nullptr 
) const
inlineoverride

Creates an execution state using the device context information and the exection unit to run on the Ascend

Parameters
[in]executionUnitexecution Unit to launch on the ascend
[in]argumentargument (not required by ascend)
Returns
return a unique pointer to the newly created Execution State

◆ createExecutionUnit()

__INLINE__ std::shared_ptr< HiCR::ExecutionUnit > HiCR::backend::ascend::ComputeManager::createExecutionUnit ( const std::vector< std::shared_ptr< ascend::Kernel > > &  kernelOperations)
inline

Creates an execution unit given a stream/vector of kernelOperations to be executed on the device

Parameters
[in]kernelOperationsthe sequence of kernel operations to executed
Returns
a pointer to the new execution unit

◆ createProcessingUnit()

__INLINE__ std::unique_ptr< HiCR::ProcessingUnit > HiCR::backend::ascend::ComputeManager::createProcessingUnit ( std::shared_ptr< HiCR::ComputeResource resource) const
inlineoverride

Create a new processing unit for the specified resource (device)

Parameters
[in]resourcethe deviceId in which the processing unit is to be created
Returns
a pointer to the new processing unit

◆ initializeImpl()

__INLINE__ void HiCR::backend::ascend::ComputeManager::initializeImpl ( std::unique_ptr< HiCR::ProcessingUnit > &  processingUnit)
inlineoverrideprotected

Internal implementation of initailizeImpl

Parameters
processingUnitthe processing unit to operate on

◆ resumeImpl()

__INLINE__ void HiCR::backend::ascend::ComputeManager::resumeImpl ( std::unique_ptr< HiCR::ProcessingUnit > &  processingUnit)
inlineoverrideprotected

Internal implementation of resumeImpl

Parameters
processingUnitthe processing unit to operate on

◆ startImpl()

__INLINE__ void HiCR::backend::ascend::ComputeManager::startImpl ( std::unique_ptr< HiCR::ProcessingUnit > &  processingUnit,
std::unique_ptr< HiCR::ExecutionState > &  executionState 
)
inlineoverrideprotected

Internal implementation of initailizeImpl

Parameters
processingUnitthe processing unit to operate on
executionStatethe execution state to operate on

◆ suspendImpl()

__INLINE__ void HiCR::backend::ascend::ComputeManager::suspendImpl ( std::unique_ptr< HiCR::ProcessingUnit > &  processingUnit)
inlineoverrideprotected

Internal implementation of suspendImpl

Parameters
processingUnitthe processing unit to operate on

◆ terminateImpl()

__INLINE__ void HiCR::backend::ascend::ComputeManager::terminateImpl ( std::unique_ptr< HiCR::ProcessingUnit > &  processingUnit)
inlineoverrideprotected

Internal implementation of terminateImpl

Parameters
processingUnitthe processing unit to operate on

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