• Lei Wang's avatar
    [Enhancement] Support more flexible layout host pythonic expr (#623) · 22aed721
    Lei Wang authored
    * [Refactor] Enhance expression handling in utils.py and update wrapper to use pythonic_expr
    
    - Added support for additional TIR expressions (FloorDiv, Min, Max, Add, Sub, FloorMod) in the pythonic_expr function to improve string representation.
    - Replaced the deprecated legalize_c function calls in TLCUDASourceWrapper and TLCPUSourceWrapper with pythonic_expr for better expression handling in kernel launch code.
    
    * [Refactor] Simplify expression handling in pythonic_expr function
    
    - Consolidated binary and min/max operation handling in the pythonic_expr function to improve readability and maintainability.
    - Replaced individual checks for binary operations with a mapping approach, streamlining the code and enhancing performance in expression representation.
    
    * [Enhancement] Improve expression representation in pythonic_expr function
    
    - Added operator precedence handling to the pythonic_expr function, enhancing the conversion of TVM PrimExpr to Python-style strings.
    - Updated the visitor logic to intelligently add parentheses based on operator precedence, improving the accuracy of expression representation.
    - Included a docstring for better clarity on the function's purpose and usage.
    
    * test fix
    22aed721
requirements-test.txt 378 Bytes