SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
smaug::Scheduler Class Reference

Scheduler is responsible for running the Network. More...

#include <scheduler.h>

Detailed Description

Scheduler is responsible for running the Network.

Definition at line 12 of file scheduler.h.

Public Member Functions

 Scheduler (Network *_network, Workspace *_workspace)
 
TensorrunNetwork ()
 Runs the Network to completion. More...
 

Protected Member Functions

TensorscheduleReady ()
 Runs the operators in the ready queue. More...
 
void maybeRunOperator (Operator *op)
 If none of the inputs to the current Operator are dead, then this will run the Operator; otherwise, otherwise, all of the Operator's outputs will be marked as dead tensors. More...
 
void updateChildren (Operator *op)
 After an Operator is run, this updates the number of pending inputs on all its children. More...
 

Protected Attributes

Networknetwork
 
Workspaceworkspace
 
std::list< Operator * > readyQueue
 The queue of all Operators ready to be executed.
 

Member Function Documentation

◆ maybeRunOperator()

void smaug::Scheduler::maybeRunOperator ( Operator op)
protected

If none of the inputs to the current Operator are dead, then this will run the Operator; otherwise, otherwise, all of the Operator's outputs will be marked as dead tensors.

The only exception is MergeOp, which can run with dead inputs.

Definition at line 72 of file scheduler.cpp.

◆ runNetwork()

Tensor * smaug::Scheduler::runNetwork ( )

Runs the Network to completion.

The final output tensor is returned.

Definition at line 13 of file scheduler.cpp.

◆ scheduleReady()

Tensor * smaug::Scheduler::scheduleReady ( )
protected

Runs the operators in the ready queue.

This may add new operators to the ready queue by calling updateChildren().

Definition at line 59 of file scheduler.cpp.

◆ updateChildren()

void smaug::Scheduler::updateChildren ( Operator op)
protected

After an Operator is run, this updates the number of pending inputs on all its children.

Any child Operator with no more pending inputs is then added to the ready queue.

Definition at line 81 of file scheduler.cpp.


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