aihwkit.simulator.parameters.base module

Base classes for the RPUConfig.

class aihwkit.simulator.parameters.base.RPUConfigBase(tile_class, runtime=<factory>)[source]

Bases: object

Base class of all RPUConfigs.

Parameters:
as_bindings()[source]

Return a representation of this instance as a simulator bindings object.

Return type:

Any

compatible_with(tile_class_name)[source]

Tests whether the RPUConfig is compatile with a given TileModule class.

Parameters:

tile_class_name (str) – name of the TileModule class

Returns:

Whether the class is compatible. By default only the class that is defined in the tile_class property of the RPUConfig

Return type:

bool

create_tile(*args, **kwargs)[source]

Created a tile with this configuration.

Short-cut for instantiating self.tile_class with given parameters.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

BaseTile

get_default_tile_module_class(out_size=0, in_size=0)[source]

Returns the default TileModule class.

Parameters:
  • out_size (int) –

  • in_size (int) –

Return type:

Type

runtime: RuntimeParameter

Parameters setting simulation runtime options, such as gradient memory management.

tile_class: Type

Tile class that correspond to the RPUConfig. Needs to be defined in the derived class.