devices.xylo.syns65302.mapper
- devices.xylo.syns65302.mapper(graph: GraphModuleBase, weight_dtype: dtype | str = 'float', threshold_dtype: dtype | str = 'float', dash_dtype: dtype | str = 'float', max_hidden_neurons: int = 992, max_output_neurons: int = 32) dict[source]
Map a computational graph onto the XyloAudio 3 architecture
This function performs a DRC of the computational graph to ensure it can be mapped onto the XyloAudio 3 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:
992, matching XyloAudio 3 hardwaremax_output_neurons (int) – Maximum number of available output neurons. Default:
32, matching XyloAudio 3 hardware
- Returns:
A dictionary of specifications for XyloAudio 3, containing the mapped computational graph
- Return type:
dict