python¶
Final Interface¶
The final interface is written in include/source, which requires external guidance for the final interface, in include it exports as _xxx.h
The writing method for the final interface is
nndeployBaseGetDevice()
python interface¶
Only contains pybind-related
Initial completion of the python module export, review the current implementation¶
Inheritance or Composition¶
This class on the python side also needs to reload, using inheritance
For example, Node
The python side is all inheritance
Composition will not affect inheritance, can inherit from the classes exported by pybind
Composition leads to inheritance of classes that also need to write related processing functions
For example, Node and Edge
This class is the final class, will not be inherited
For example, Edge
This class needs to be inherited
For example, Node
Flexible Button or Smart Button¶
Does not affect functionality, can be changed to a smart button entirely (let’s test it, go run on 4060)
For example, Param
For example, Inference
Type strong conversion¶
How to solve the module problem¶
Return value strategy¶
Usability¶
Refer to the interface design of pytorch
DataType’s usability (recommended to construct with string)
DeviceType’s usability (recommended to construct with string)
Status’s usability (recommended to construct with string)