afe.ir.execute

Attributes

execute_node

execute_node_quant

Classes

NodeExecutor

A callable object that executes a node as part of AwesomeNet.run.

Functions

execute_ir(→ afe.ir.sima_ir.SiMaIRTensorTypes)

Execute the SiMaIR of the non-quantized node.

execute_ir_quant(→ afe.ir.sima_ir.SiMaIRTensorTypes)

Execute the SiMaIR of the quantized node.

node_executor(→ NodeExecutor)

Create an executor for a non-quantized AwesomeNode.

node_quant_executor(→ NodeExecutor)

Create an executor for a quantized AwesomeNode.

create_node_executor(fast_mode)

create_node_quant_executor(→ NodeExecutor)

Module Contents

afe.ir.execute.execute_ir(ir: afe.ir.sima_ir.SiMaIR, inputs: Dict[afe.ir.defines.InputName, afe.ir.sima_ir.SiMaIRTensorTypes], config: afe.core.configs.RunConfigs) afe.ir.sima_ir.SiMaIRTensorTypes[source]

Execute the SiMaIR of the non-quantized node.

Parameters:
  • ir – SiMaIR. The IR of the node to be executed.

  • inputs – Dict[InputName, SiMaIRTensorTypes]. Inputs of the node.

  • config – Configuration for how to execute a node.

Returns:

SiMaIRTensorTypes. Results obtained by running the SiMaIR.

afe.ir.execute.execute_ir_quant(ir: afe.ir.sima_ir.SiMaIR, inputs: Dict[afe.ir.defines.InputName, afe.ir.sima_ir.SiMaIRTensorTypes], config: afe.core.configs.RunConfigs) afe.ir.sima_ir.SiMaIRTensorTypes[source]

Execute the SiMaIR of the quantized node.

Parameters:
  • ir – SiMaIR. The IR of the node to be executed.

  • inputs – Dict[InputName, SiMaIRTensorTypes]. Inputs of the node.

  • config – Configuration for how to execute a node.

Returns:

SiMaIRTensorTypes. Results obtained by running the SiMaIR.

class afe.ir.execute.NodeExecutor[source]

A callable object that executes a node as part of AwesomeNet.run.

afe.ir.execute.node_executor(config: afe.core.configs.RunConfigs) NodeExecutor[source]

Create an executor for a non-quantized AwesomeNode.

Parameters:

config – Configuration for how to execute a node.

Returns:

Executor.

afe.ir.execute.node_quant_executor(config: afe.core.configs.RunConfigs) NodeExecutor[source]

Create an executor for a quantized AwesomeNode.

Parameters:

config – Configuration for how to execute a node.

Returns:

Executor. The executor takes the same parameters as execute_node.

afe.ir.execute.create_node_executor(fast_mode: bool)[source]
afe.ir.execute.create_node_quant_executor(fast_mode: bool) NodeExecutor[source]
afe.ir.execute.execute_node: NodeExecutor[source]
afe.ir.execute.execute_node_quant: NodeExecutor[source]