Deeploy.Targets.Snitch.Platform.SnitchClusterEngine
- class Deeploy.Targets.Snitch.Platform.SnitchClusterEngine(name: str, Mapping={'Add': AddLayer(maps=[ AddParser [ _SnitchAddTemplate(int8_t, int8_t) -> int32_t ] ]), 'Gather': GatherLayer(maps=[ GatherParser [ NodeTemplate(int8_t, int32_t) -> int8_t NodeTemplate(int16_t, int32_t) -> int16_t NodeTemplate(int32_t, int32_t) -> int32_t NodeTemplate(int64_t, int32_t) -> int64_t NodeTemplate(float32_t, int8_t) -> float32_t NodeTemplate(float32_t, uint8_t) -> float32_t NodeTemplate(float32_t, int16_t) -> float32_t NodeTemplate(float32_t, uint16_t) -> float32_t NodeTemplate(float32_t, int32_t) -> float32_t NodeTemplate(float32_t, uint32_t) -> float32_t NodeTemplate(float32_t, int64_t) -> float32_t NodeTemplate(float32_t, uint64_t) -> float32_t ] ]), 'Gemm': GEMMLayer(maps=[ SnitchGEMMParser [ SnitchGemmTemplate(int8_t, int8_t, int32_t) -> int32_t NodeTemplate(float32_t, float32_t, float32_t) -> float32_t ] ]), 'MatMul': MatMulLayer(maps=[ MatMulParser [ _MatMulTemplate(int8_t, int8_t) -> int32_t NodeTemplate(float32_t, float32_t) -> float32_t ] ]), 'Pad': PadLayer(maps=[ Pad1DParser [ _Pad1DTemplate(int8_t) -> int8_t _Pad1DTemplate(int16_t) -> int16_t _Pad1DTemplate(int32_t) -> int32_t _Pad1DTemplate(int64_t) -> int64_t ] Pad2DParser [ _Pad2DTemplate(int8_t) -> int8_t _Pad2DTemplate(int16_t) -> int16_t _Pad2DTemplate(int32_t) -> int32_t _Pad2DTemplate(int64_t) -> int64_t NodeTemplate(float32_t, float32_t, float32_t) -> float32_t ] ]), 'RQGemm': RQGEMMLayer(maps=[ SnitchRQGEMMParser [ SnitchRqGemmTemplate(int8_t, int8_t, int32_t, int32_t, int32_t) -> int8_t ] ]), 'RQIntegerDiv': RQIntegerDivLayer(maps=[ RQIntegerDivParser [ NodeTemplate(int32_t, int32_t, int32_t, int32_t, int32_t) -> int8_t ] ]), 'RequantizedAdd': AddLayer(maps=[ RQAddParser [ RQAddTemplate(int8_t, int8_t) -> int8_t ] ]), 'Softmax': SoftmaxLayer(maps=[ SoftmaxParser [ iSoftmaxPreAllocatedBuffTemplate(int8_t) -> uint8_t iSoftmaxPreAllocatedBuffTemplate(uint8_t) -> uint8_t FloatSoftmaxTemplate(float32_t) -> float32_t ] ]), 'Unsqueeze': ReshapeLayer(maps=[ UnsqueezeParser [ _ReshapeTemplate(int8_t, int32_t) -> int8_t _ReshapeTemplate(uint8_t, int32_t) -> uint8_t _ReshapeTemplate(int16_t, int32_t) -> int16_t _ReshapeTemplate(uint16_t, int32_t) -> uint16_t _ReshapeTemplate(int32_t, int32_t) -> int32_t _ReshapeTemplate(uint32_t, int32_t) -> uint32_t _ReshapeTemplate(int64_t, int32_t) -> int64_t _ReshapeTemplate(uint64_t, int32_t) -> uint64_t _ReshapeTemplate(float32_t, int8_t) -> float32_t _ReshapeTemplate(float32_t, uint8_t) -> float32_t _ReshapeTemplate(float32_t, int16_t) -> float32_t _ReshapeTemplate(float32_t, uint16_t) -> float32_t _ReshapeTemplate(float32_t, int32_t) -> float32_t _ReshapeTemplate(float32_t, uint32_t) -> float32_t _ReshapeTemplate(float32_t, int64_t) -> float32_t _ReshapeTemplate(float32_t, uint64_t) -> float32_t ] ]), 'iLayerNorm': LayerNormLayer(maps=[ iLayerNormParser [ _iLayerNormTemplate(int8_t, int32_t, int32_t) -> int8_t NodeTemplate(float32_t, float32_t, float32_t) -> float32_t, float32_t, float32_t ] ]), 'iNoNorm': iNoNormLayer(maps=[ iNoNormParser [ _iNoNormTemplate(int8_t, int8_t, int32_t) -> int8_t ] ]), 'iSoftmax': SoftmaxLayer(maps=[ iSoftmaxParser [ iSoftmaxPreAllocatedBuffTemplate(int8_t) -> uint8_t iSoftmaxPreAllocatedBuffTemplate(uint8_t) -> uint8_t FloatSoftmaxTemplate(float32_t) -> float32_t ] ])}, initCode='', includeList=['snrt.h', 'DeeploySnitchMath.h'])
Bases:
DeploymentEngine
Methods
- __init__(name: str, Mapping={'Add': AddLayer(maps=[ AddParser [ _SnitchAddTemplate(int8_t, int8_t) -> int32_t ] ]), 'Gather': GatherLayer(maps=[ GatherParser [ NodeTemplate(int8_t, int32_t) -> int8_t NodeTemplate(int16_t, int32_t) -> int16_t NodeTemplate(int32_t, int32_t) -> int32_t NodeTemplate(int64_t, int32_t) -> int64_t NodeTemplate(float32_t, int8_t) -> float32_t NodeTemplate(float32_t, uint8_t) -> float32_t NodeTemplate(float32_t, int16_t) -> float32_t NodeTemplate(float32_t, uint16_t) -> float32_t NodeTemplate(float32_t, int32_t) -> float32_t NodeTemplate(float32_t, uint32_t) -> float32_t NodeTemplate(float32_t, int64_t) -> float32_t NodeTemplate(float32_t, uint64_t) -> float32_t ] ]), 'Gemm': GEMMLayer(maps=[ SnitchGEMMParser [ SnitchGemmTemplate(int8_t, int8_t, int32_t) -> int32_t NodeTemplate(float32_t, float32_t, float32_t) -> float32_t ] ]), 'MatMul': MatMulLayer(maps=[ MatMulParser [ _MatMulTemplate(int8_t, int8_t) -> int32_t NodeTemplate(float32_t, float32_t) -> float32_t ] ]), 'Pad': PadLayer(maps=[ Pad1DParser [ _Pad1DTemplate(int8_t) -> int8_t _Pad1DTemplate(int16_t) -> int16_t _Pad1DTemplate(int32_t) -> int32_t _Pad1DTemplate(int64_t) -> int64_t ] Pad2DParser [ _Pad2DTemplate(int8_t) -> int8_t _Pad2DTemplate(int16_t) -> int16_t _Pad2DTemplate(int32_t) -> int32_t _Pad2DTemplate(int64_t) -> int64_t NodeTemplate(float32_t, float32_t, float32_t) -> float32_t ] ]), 'RQGemm': RQGEMMLayer(maps=[ SnitchRQGEMMParser [ SnitchRqGemmTemplate(int8_t, int8_t, int32_t, int32_t, int32_t) -> int8_t ] ]), 'RQIntegerDiv': RQIntegerDivLayer(maps=[ RQIntegerDivParser [ NodeTemplate(int32_t, int32_t, int32_t, int32_t, int32_t) -> int8_t ] ]), 'RequantizedAdd': AddLayer(maps=[ RQAddParser [ RQAddTemplate(int8_t, int8_t) -> int8_t ] ]), 'Softmax': SoftmaxLayer(maps=[ SoftmaxParser [ iSoftmaxPreAllocatedBuffTemplate(int8_t) -> uint8_t iSoftmaxPreAllocatedBuffTemplate(uint8_t) -> uint8_t FloatSoftmaxTemplate(float32_t) -> float32_t ] ]), 'Unsqueeze': ReshapeLayer(maps=[ UnsqueezeParser [ _ReshapeTemplate(int8_t, int32_t) -> int8_t _ReshapeTemplate(uint8_t, int32_t) -> uint8_t _ReshapeTemplate(int16_t, int32_t) -> int16_t _ReshapeTemplate(uint16_t, int32_t) -> uint16_t _ReshapeTemplate(int32_t, int32_t) -> int32_t _ReshapeTemplate(uint32_t, int32_t) -> uint32_t _ReshapeTemplate(int64_t, int32_t) -> int64_t _ReshapeTemplate(uint64_t, int32_t) -> uint64_t _ReshapeTemplate(float32_t, int8_t) -> float32_t _ReshapeTemplate(float32_t, uint8_t) -> float32_t _ReshapeTemplate(float32_t, int16_t) -> float32_t _ReshapeTemplate(float32_t, uint16_t) -> float32_t _ReshapeTemplate(float32_t, int32_t) -> float32_t _ReshapeTemplate(float32_t, uint32_t) -> float32_t _ReshapeTemplate(float32_t, int64_t) -> float32_t _ReshapeTemplate(float32_t, uint64_t) -> float32_t ] ]), 'iLayerNorm': LayerNormLayer(maps=[ iLayerNormParser [ _iLayerNormTemplate(int8_t, int32_t, int32_t) -> int8_t NodeTemplate(float32_t, float32_t, float32_t) -> float32_t, float32_t, float32_t ] ]), 'iNoNorm': iNoNormLayer(maps=[ iNoNormParser [ _iNoNormTemplate(int8_t, int8_t, int32_t) -> int8_t ] ]), 'iSoftmax': SoftmaxLayer(maps=[ iSoftmaxParser [ iSoftmaxPreAllocatedBuffTemplate(int8_t) -> uint8_t iSoftmaxPreAllocatedBuffTemplate(uint8_t) -> uint8_t FloatSoftmaxTemplate(float32_t) -> float32_t ] ])}, initCode='', includeList=['snrt.h', 'DeeploySnitchMath.h']) None
Instantiate a new engine
- Parameters:
name (str) – Name of this compute engine; must be unique per deployemnt
Mapping (Dict[str, Union[ONNXLayer, Callable[[gs.Node], Any]]]) – Mapping between operator names and ONNXLayer implementations
initCode (str) – Static initialization code for this engine
includeList (List[str]) – List of header files to be included with #include directives
__init__
(name[, Mapping])Instantiate a new engine
canExecute
(node)Return whether this accelerator can execute an operator
Attributes
Name of this compute engine; must be unique per deployemnt
Mapping between operator names and ONNXLayer implementations
List of header files to be included with #include directives
- canExecute(node: Node) bool
Return whether this accelerator can execute an operator
- Parameters:
node (gs.Node) – Operator to be checked
- Returns:
True if operator can be run on this Engine, False otherwise
- Return type:
bool
- name
Name of this compute engine; must be unique per deployemnt
- Type:
str
- Mapping
Mapping between operator names and ONNXLayer implementations
- includeList
List of header files to be included with #include directives
- Type:
List[str]