devices.xylo.syns63300.mapper
- devices.xylo.syns63300.mapper(graph: GraphModuleBase, weight_dtype: dtype | str = 'float', threshold_dtype: dtype | str = 'float', dash_dtype: dtype | str = 'float', max_hidden_neurons: int = 496, max_output_neurons: int = 16) dict[source]
Map a computational graph onto the Xylo IMU architecture
This function performs a DRC of the computational graph to ensure it can be mapped onto the Xylo IMU architecture.
Warning
mapper()operates in-place on the graph, and may modify it. If you need the un-mapped graph, you may need to callModule.as_graph()again on yourModule.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:
496, matching Xylo-IMU hardwaremax_output_neurons (int) – Maximum number of available output neurons. Default:
16, matching Xylo-IMU hardware
- Returns:
A dictionary of specifications for Xylo IMU, containing the mapped computational graph
- Return type:
dict