Converters for topology IR are stored in this file.


Bases: object

declare_logical_operator(alias, model=None)[source]

This function is used to declare new logical operator.

declare_logical_variable(original_input_name, type=None)[source]

This function creates a new logical variable within the topology. If original_input_name has been used to create other variables, the new variable will hide all other variables created using original_input_name.

property input_container

Returns the input container wrapping the original input model.


This is an iterator of all operators in the Topology object. Operators are returned in a topological order.

property variables

Returns all the logical variables of the topology., executor, trace_input, target, ctx, config, extra_config)[source][source], remainder_size=None, extra_config={})[source]

Utility function used to properly put the inputs into a format understandable by torch. If remainder_size is provided, also return inputs for a remainder model (see below)., trace_input, device, extra_config)[source]

Function used to convert an input pytorch model into torchscript., backend, test_input, device, extra_config={})[source]

This function is used to convert a Topology object into a backend model.


topology: The Topology object that will be converted into a backend model backend: Which backend the model should be run on test_input: Inputs for PyTorch model tracing device: Which device the translated model will be run on extra_config: Extra configurations to be used by individual operator converters


A model implemented in the selected backend