aihwkit.simulator.tiles.analog_mvm module
Implementation of analog MVM for torch tiles.
- class aihwkit.simulator.tiles.analog_mvm.AnalogMVM[source]
Bases:
object
Torch implementation of (part of) the IO-managed forward / backward pass in RPUCuda.
- classmethod check_support(io_pars)[source]
Check whether the IO settings are supported.
Throws an assertion error when there is an incompatibility
- Parameters:
io_pars (IOParameters) – the IOParameters to be checked
- Raises:
ConfigError – in case a feature is not supported
- Return type:
None
- classmethod matmul(weight, input_, io_pars, trans=False, is_test=False, **fwd_pars)[source]
Noisy, io-managed mat-mul.
- Parameters:
weight (Tensor) – weight matrix (
out_size
,in_size
)input – activation (m,
in_size
/out_size
)io_pars (IOParameters) – Parameter defining the mat-mul nonlinearities
trans (bool) – transpose of the weight (so that
in_size
andout_size
is transposed).is_test (bool) – whether testing or training mode
fwd_pars (Any) – additional parameter dictionary
input_ (Tensor) –
- Returns:
Result tensor
- Return type:
Tensor