How to add support for a new chip#
In order to add support for a new chip in, you will need to perform the following steps.
Add the device to
device_types
dictionary inio.py
. The dictionary comprises adevice_name_string
and its correspondingdevice_name
in the samnaDeviceInfo
object. Thedevice_name_string
should be a word in lower case alphabets with no spaces or special characters. The string should be a qualified variable name in python. The device is discovered based on theDeviceInfor.device_name
and therefore should match the exactdevice_name
string insamna
.Implement a
ConfigBuilder
for your device. This builder describes how a model will be converted to a samnaconfig
object for your device type. You can base your implementation on the current implementations for other chips in the folder/modulesinabs.backend.dynapcnn.chips
Add the
ConfigBuilder
implemented in step2
to theChipFactory
inchip_factory.py
.
That should be it!
You will now be able to call make_config
or the to
method in DynapcnnNetwork
and refer to your device with the name you chose device_name_string
in step 1
.