SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
Public Member Functions | Protected Attributes | List of all members
smaug::SplitOp< Backend > Class Template Reference

Implements the split operator, which divides a Tensor into N output Tensors along a specified dimension. More...

#include <split_op.h>

Detailed Description

template<typename Backend>
class smaug::SplitOp< Backend >

Implements the split operator, which divides a Tensor into N output Tensors along a specified dimension.

Template Parameters
BackendThe Backend specialization of this Operator.

Definition at line 42 of file backend.h.

Public Member Functions

 SplitOp (const std::string &name, Workspace *workspace)
 
 SplitOp (const std::string &name, Workspace *workspace, const std::vector< int > &_splits, int axis=0)
 
void setSplits (const std::vector< int > &_splits)
 Set the size (along the split axis) of each split Tensor.
 
void setSplits (const std::initializer_list< int > &_splits)
 
void setSplitAxis (int axis)
 Set the axis along which to split the input Tensor.
 
const std::vector< int > & getSplits () const
 
int getSplitAxis () const
 
bool validate () override
 
void createAllTensors () override
 
void run () override
 

Protected Attributes

int splitAxis
 
std::vector< int > splits
 

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