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

The base class of all Tensor objects. More...

#include <tensor.h>

Inheritance diagram for smaug::TensorBase:
smaug::Tensor smaug::TiledTensor

Detailed Description

The base class of all Tensor objects.

This contains common properties used by all Tensor implementations, like name, shape, and data type, but it does not contain the data itself. Subclasses are responsible for designing, allocating, and managing data storage.

Definition at line 269 of file tensor.h.

Public Member Functions

 TensorBase (const std::string &_name, const TensorShape &_shape)
 
 TensorBase (const TensorProto &tensorProto)
 
std::string getName () const
 
const TensorShapegetShape () const
 
int ndims () const
 
int dim (int index) const
 
int getTotalDim (int index) const
 
int getDataStorageFormat () const
 
DataType getDataType () const
 
int getDataTypeSize () const
 
bool isDead () const
 
void setDead (bool _dead=true)
 
virtual bool containsData () const =0
 

Protected Attributes

std::string name
 Name of of the Tensor. More...
 
TensorShape shape
 Shape of the Tensor.
 
DataStorageFormat dataFormat
 Indicates the compression format of the data. More...
 
DataType dataType
 
bool dead
 If true, the tensor is dead, which means it is on an untaken control flow path. More...
 

Member Data Documentation

◆ dataFormat

DataStorageFormat smaug::TensorBase::dataFormat
protected

Indicates the compression format of the data.

NOTE: Compressed data formats are not currently supported in SMAUG.

Definition at line 324 of file tensor.h.

◆ dead

bool smaug::TensorBase::dead
protected

If true, the tensor is dead, which means it is on an untaken control flow path.

All operators that consume this tensor will eventually be marked dead (except for MergeOp).

Definition at line 331 of file tensor.h.

◆ name

std::string smaug::TensorBase::name
protected

Name of of the Tensor.

This should be a unique in the Workspace.

Definition at line 317 of file tensor.h.


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