afe.apis.release_v1

This is the development API for AFE. It supports importing models, loading and storing AFE’s internal format, quantizing, executing, and simulating.

Functions

create_auxiliary_processing_network(...)

Creates an AwesomeNet from the list of Transforms.

compose_awesomenets(→ afe.ir.net.AwesomeNet)

Creates an AwesomeNet form the list of AwesomeNets. Each AwesomeNet in the list

get_model_sdk_version(→ str)

Module Contents

afe.apis.release_v1.create_auxiliary_processing_network(transforms: List[afe.apis.transform.Transform], input_types: Dict[afe.ir.defines.InputName, afe.ir.tensor_type.TensorType], *, input_node_names: List[afe.ir.defines.NodeName] | None = None, net_name: str = 'aux_net', status: afe.ir.defines.Status = Status.RELAY, target: sima_utils.common.Platform = gen1_target) afe.ir.net.AwesomeNet[source]

Creates an AwesomeNet from the list of Transforms.

Parameters:
  • transforms – The list of Transforms. Each transform in the list correspond to one input.

  • input_types – The list of input types. Each input correspond to one Transform.

  • input_node_names – If set, determines the input names of the resulting AwesomeNet.

  • net_name – The name of the resulting AwesomeNet. Default it “aux_net”.

  • status – The status of the created AwesomeNet. Default is Status.RELAY.

  • target – A target platform that a model is compiled for.

Returns:

AwesomeNet containing nodes corresponding to the transforms list.

afe.apis.release_v1.compose_awesomenets(nets: List[afe.ir.net.AwesomeNet], status: afe.ir.defines.Status = Status.RELAY, combined_model_name: str = 'main') afe.ir.net.AwesomeNet[source]

Creates an AwesomeNet form the list of AwesomeNets. Each AwesomeNet in the list of input AwesomeNets becomes the subnet of the resulting AwesomeNet.

Parameters:
  • nets – List[AwesomeNet]. The list of input AwesomeNet which are to be composed into a single AwesomeNet.

  • status – Parameter setting the status of composed network. Default value is Status.RELAY

  • combined_model_name – Combined model name.

Returns:

The AwesomeNet consisting of the input AwesomeNets.

afe.apis.release_v1.get_model_sdk_version() str[source]