tenstorrent / tt-forge-fe

The TT-Forge FE is a graph compiler designed to optimize and transform computational graphs for deep learning models, enhancing their performance and efficiency.
https://docs.tenstorrent.com/tt-forge-fe/
Apache License 2.0
20 stars 3 forks source link

[Model Analysis] Restructure the generating unique op test function #723

Open chandrasekaranpradeep opened 1 week ago

chandrasekaranpradeep commented 1 week ago

Function Purpose The generate_unique_op_tests function in the tvm_to_python.py file is used for extracting unique op configuration based upon the operand node type(i.e Activation/Parameter/Constant), operand shape and operand datatype and then compare the operation argument if any and store operation names in association with operation argument and generate the forge module and test.

Restructure the generate_unique_op_tests function:

  1. We are collecting process framework parameter function status when there is params or constants used in the forge module class defination and forward function and then use it in pytest parameter instead we declare the function as method with ForgeModule (i.e base class) and so we can avoid this in the generate_unique_op_tests and write_pytest_function in ForgeWritter.

Restructure the model_analysis script

  1. Move the compiler_component and exception mapping list (i.e common_failure_matching_rules_list) to separate file for properly managing it