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_typesdictionary inio.py. The dictionary comprises adevice_name_stringand its correspondingdevice_namein the samnaDeviceInfoobject. Thedevice_name_stringshould 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_nameand therefore should match the exactdevice_namestring insamna.Implement a
ConfigBuilderfor your device. This builder describes how a model will be converted to a samnaconfigobject for your device type. You can base your implementation on the current implementations for other chips in the folder/modulesinabs.backend.dynapcnn.chipsAdd the
ConfigBuilderimplemented in step2to theChipFactoryinchip_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.