Skip to content

Enumerations

Below are all the enumerations that exist within the Forge codebase. These enumerations are mainly constructs for the graph backend within Forge. They are encoded within and outside the graphs.

String Enumerations

All enumerations are Python strings. Using Python string primitives improves the efficiency of encoding data within the graphs.


forge.relay.graph.enums.ActivationType

Bases: str, Enum

Attributes:

Name Type Description
TENSOR
TUPLE

Attributes

TENSOR class-attribute instance-attribute

TENSOR = 'TensorType'

TUPLE class-attribute instance-attribute

TUPLE = 'TupleType'

forge.relay.graph.enums.OperatorType

Bases: str, Enum

Attributes:

Name Type Description
OP
LAMBDA
GLOBAL

Attributes

OP class-attribute instance-attribute

OP = 'Op'

LAMBDA class-attribute instance-attribute

LAMBDA = 'Lambda'

GLOBAL class-attribute instance-attribute

GLOBAL = 'Global'

forge.relay.graph.enums.RelayExprType

Bases: str, Enum

Attributes:

Name Type Description
FUNCTION
CALL
TUPLE
TUPLEGETITEM
VAR
CONSTANT

Attributes

FUNCTION class-attribute instance-attribute

FUNCTION = 'Function'

CALL class-attribute instance-attribute

CALL = 'Call'

TUPLE class-attribute instance-attribute

TUPLE = 'Tuple'

TUPLEGETITEM class-attribute instance-attribute

TUPLEGETITEM = 'TupleGetItem'

VAR class-attribute instance-attribute

VAR = 'Var'

CONSTANT class-attribute instance-attribute

CONSTANT = 'Constant'

forge.relay.graph.enums.QuantizationType

Bases: str, Enum

Attributes:

Name Type Description
ANY
STATIC
DYNAMIC

Attributes

ANY class-attribute instance-attribute

ANY = 'any'

STATIC class-attribute instance-attribute

STATIC = 'static'

DYNAMIC class-attribute instance-attribute

DYNAMIC = 'dynamic'

forge.relay.graph.enums.DataType

Bases: str, Enum

Attributes:

Name Type Description
INT8
INT16
INT32
UINT8
FLOAT16
FLOAT32

Attributes

INT8 class-attribute instance-attribute

INT8 = 'int8'

INT16 class-attribute instance-attribute

INT16 = 'int16'

INT32 class-attribute instance-attribute

INT32 = 'int32'

UINT8 class-attribute instance-attribute

UINT8 = 'uint8'

FLOAT16 class-attribute instance-attribute

FLOAT16 = 'float16'

FLOAT32 class-attribute instance-attribute

FLOAT32 = 'float32'

forge.relay.graph.enums.CalibrationMethod

Bases: str, Enum

Attributes:

Name Type Description
MINMAX
ENTROPY
AVERAGE
PERCENTILE

Attributes

MINMAX class-attribute instance-attribute

MINMAX = 'minmax'

ENTROPY class-attribute instance-attribute

ENTROPY = 'entropy'

AVERAGE class-attribute instance-attribute

AVERAGE = 'average'

PERCENTILE class-attribute instance-attribute

PERCENTILE = 'percentile'