Skip to content

Commit

Permalink
feat(docs): add half-precision training section in using_simulator docs
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Carmona Gonzalez <[email protected]>
  • Loading branch information
PabloCarmona committed Aug 14, 2024
1 parent 69e524f commit 7ee0f44
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/source/using_simulator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,21 @@ instead of manually specifying a ``RPU Configuration``::
tile = AnalogTile(10, 20, rpu_config=TikiTakaEcRamPreset())


Working with half-precision training
------------------------------------

The simulator supports half-precision training. This can be enabled by setting the
``RPUDataType`` to ``HALF`` when creating the configuration::

from aihwkit.simulator.configs import InferenceRPUConfig
from aihwkit.simulator.parameters.enums import RPUDataType

rpu_config = InferenceRPUConfig() # or TorchInferenceRPUConfig().
rpu_config.runtime.data_type = RPUDataType.HALF

For more info look into :py:mod:`aihwkit.simulator.parameters.enums.RPUDataType`.


.. _Gokmen & Haensch 2020: https://www.frontiersin.org/articles/10.3389/fnins.2020.00103/full
.. _Example 7: https://github.com/IBM/aihwkit/blob/master/examples/07_simple_layer_with_other_devices.py
.. _Example 8: https://github.com/IBM/aihwkit/blob/master/examples/08_simple_layer_with_tiki_taka.py
Expand Down

0 comments on commit 7ee0f44

Please sign in to comment.