![]() ![]() ![]() "Custom Operator Development > Unit Test" and " Custom Operator Development > System Test" in MindStudio User Guideīuild the operator plug-in implementation file, prototype definition file, and information definition file into the operator plug-in library file, operator prototype library, and operator information library, respectively. ST: verifies the operator functionality on a complete integrated system.The selected scenario combination should cover all branches of the operator code (the coverage should reach 100%), to reduce the failure rate for built operator code in different scenarios. UT focuses on ensuring that the operator program can run properly. UT: verifies the correctness of the operator code logic.Write UT/ST cases and runs the test cases to verify the operator functionality and logic. During offline model conversion, based on the operator information in the operator information library, FE performs basic verification, inserts conversion nodes for the operator as required, and finds the operator implementation code to build the operator binary file. Operator information definition: registers the operator information to the operator information library, including the input and output dtype and format, and input shape of the operator. If the verification passes, GE infers the output shape and dtype of each node by calling the inference function of the operator prototype library and allocates static memory for the result tensor. During offline model conversion, GE calls the verification API of the operator prototype library to verify operator arguments. The information defined by the prototype is registered with the operator prototype library of GE. Operator prototype definition: defines the constraints on the operator to run on the Ascend AI Processor, mainly the mathematical meanings of the operator by defining operator inputs, outputs, attributes, and their value ranges, verifying arguments, and inferring shape. With the custom operator implementation code delivered, you also need to develop a plug-in to map the TensorFlow operator to an operator that adapts to the Ascend AI Processor. Operator plug-in implementation: required in custom operator development on a third-party framework (such as TensorFlow). Operator code implementation: implements operator compute logic and scheduling "Custom Operator Development > Project Creation" in MindStudio User Guide If you need to develop more than one TBE operator, implement them in the same operator project.Ĭurrently, to develop a custom operator in MindStudio, the original framework must be TensorFlow. You can develop operators based on these templates. After that, the operator project directory and corresponding file templates are generated automatically. Table 5-2 TBE development workflow in MindStudioīefore developing an operator, you need to analyze the operator, specify the operator function, inputs, and outputs, select an operator development mode, and name the operator type and operator implementation function.Ĭreate a TBE operator project in MindStudio. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |