SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
|
Implements the split operator, which divides a Tensor into N output Tensors along a specified dimension. More...
#include <split_op.h>
Implements the split operator, which divides a Tensor into N output Tensors along a specified dimension.
Backend | The Backend specialization of this Operator. |
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 |