devices.xylo.syns61201.mapper

devices.xylo.syns61201.mapper(graph: GraphModuleBase, weight_dtype: dtype | str = 'float', threshold_dtype: dtype | str = 'float', dash_dtype: dtype | str = 'float', max_hidden_neurons: int = 1000, max_output_neurons: int = 8) dict[source]

Map a computational graph onto the Xylo v2 (SYNS61201) architecture

This function performs a DRC of the computational graph to ensure it can be mapped onto the Xylo v2 (SYNS61201) architecture.

Warning

mapper() operates in-place on the graph, and may modify it. If you need the un-mapped graph, you may need to call Module.as_graph() again on your Module.

It then allocates neurons and converts the network weights into a specification for Xylo. This specification can be used to create a config object with config_from_specification().

Parameters:
  • graph (GraphModuleBase) – The graph to map

  • weight_dtype (Union[np.dtype, str]) – Data type for mapped weight parameters. Default: "int8"

  • threshold_dtype (Union[np.dtype, str]) – Data type for mapped threshold parameters. Default: "int16"

  • dash_dtype (Union[np.dtype, str]) – Data type for mapped dash (bitshift time constant) parameters. Default: "uint8"

  • max_hidden_neurons (int) – Maximum number of available hidden neurons. Default: 1000, matching Xylo hardware

  • max_output_neurons (int) – Maximum number of available output neurons. Default: 8, matching Xylo hardware

Returns:

A dictionary of specifications for Xylo v2, containing the mapped computational graph

Return type:

dict