ExaTN
Classes | Public Member Functions | List of all members
exatn::runtime::TensorRuntime Class Referencefinal

Public Member Functions

 TensorRuntime (const std::string &graph_executor_name="eager-dag-executor", const std::string &node_executor_name="talsh-node-executor")
 
 TensorRuntime (const TensorRuntime &)=delete
 
TensorRuntimeoperator= (const TensorRuntime &)=delete
 
 TensorRuntime (TensorRuntime &&) noexcept=delete
 
TensorRuntimeoperator= (TensorRuntime &&) noexcept=delete
 
void resetLoggingLevel (int level=0)
 
void openScope (const std::string &scope_name)
 
void pauseScope ()
 
void resumeScope (const std::string &scope_name)
 
void closeScope ()
 
bool currentScopeIsSet () const
 
VertexIdType submit (std::shared_ptr< TensorOperation > op)
 
bool sync (TensorOperation &op, bool wait=true)
 
bool sync (const Tensor &tensor, bool wait=true)
 
std::future< std::shared_ptr< talsh::Tensor > > getLocalTensor (std::shared_ptr< Tensor > tensor, const std::vector< std::pair< DimOffset, DimExtent >> &slice_spec)
 

Member Function Documentation

◆ closeScope()

void exatn::runtime::TensorRuntime::closeScope ( )

Closes the current scope, fully completing all tensor operations in the current execution graph.

◆ currentScopeIsSet()

bool exatn::runtime::TensorRuntime::currentScopeIsSet ( ) const
inline

Returns TRUE if there is the current scope is set.

◆ getLocalTensor()

std::future< std::shared_ptr< talsh::Tensor > > exatn::runtime::TensorRuntime::getLocalTensor ( std::shared_ptr< Tensor tensor,
const std::vector< std::pair< DimOffset, DimExtent >> &  slice_spec 
)

Returns a locally stored tensor slice (talsh::Tensor) providing access to tensor elements. This slice will be extracted from the exatn::numerics::Tensor implementation as a copy. The returned future becomes ready once the execution thread has retrieved the slice copy.

◆ openScope()

void exatn::runtime::TensorRuntime::openScope ( const std::string &  scope_name)

Opens a new scope represented by a new execution graph (DAG).

◆ pauseScope()

void exatn::runtime::TensorRuntime::pauseScope ( )

Pauses the current scope by completing all outstanding tensor operations and pausing the further progress of the current execution graph until resume. Returns TRUE upon successful pausing, FALSE otherwise.

◆ resetLoggingLevel()

void exatn::runtime::TensorRuntime::resetLoggingLevel ( int  level = 0)

Resets the logging level (0:none) [MAIN THREAD].

◆ resumeScope()

void exatn::runtime::TensorRuntime::resumeScope ( const std::string &  scope_name)

Resumes the execution of a previously paused scope (execution graph).

◆ submit()

VertexIdType exatn::runtime::TensorRuntime::submit ( std::shared_ptr< TensorOperation op)

Submits a tensor operation into the current execution graph and returns its integer id.

◆ sync() [1/2]

bool exatn::runtime::TensorRuntime::sync ( const Tensor tensor,
bool  wait = true 
)

Tests for completion of all outstanding update operations on a given tensor. If wait = TRUE, it will block until completion.

◆ sync() [2/2]

bool exatn::runtime::TensorRuntime::sync ( TensorOperation op,
bool  wait = true 
)

Tests for completion of a given tensor operation. If wait = TRUE, it will block until completion.


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