Updated on 2022-03-13 GMT+08:00

Procedure

The code of a TE operator is developed in Python. Figure 1 shows the implementation procedure.

Figure 1 Implementation process of a TE custom operator
  • The supported input data types for custom operators are as follows: float16, int8, int16, int32, uint8, uint16, and bool.
    • The supported data types vary with the operation. For details, see the TE API Reference.
    • TE APIs support both the float16 and float32 types. However, OMG converts the float32 type to the float16 type during model conversion. Therefore, the current version does not support the float32 type for custom operator development.
  • TE provides sample code of some custom operators for user reference or direct use in ddk/site-packages/topi-0.4.0.egg/topi/cce in the DDK installation directory.