Deeploy.DeeployTypes.DeploymentEngine

class Deeploy.DeeployTypes.DeploymentEngine(name: str, Mapping: Dict[str, ONNXLayer | Callable[[Node], Any]], initCode: str = '', includeList: List[str] = [''])

Bases: object

Deeploy abstraction to represent a compute engine without a complete host system, like an accelerator

Methods

__init__(name: str, Mapping: Dict[str, ONNXLayer | Callable[[Node], Any]], initCode: str = '', includeList: List[str] = ['']) 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[, initCode, includeList])

Instantiate a new engine

canExecute(node)

Return whether this accelerator can execute an operator

Attributes

name

Name of this compute engine; must be unique per deployemnt

Mapping

Mapping between operator names and ONNXLayer implementations

includeList

List of header files to be included with #include directives

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]

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