• Lei Wang's avatar
    [Bugfix] Support `T.clear` for let binding (#268) · 47caf219
    Lei Wang authored
    * Fix indentation in JIT adapter wrapper to ensure consistent formatting of return statement in generated C code.
    
    * Enhance Fill Operation in TileLang
    
    - Updated the Fill constructor to support BufferLoad instances, adding checks for ramp indices and ensuring only stride 1 ramps are processed.
    - Introduced a region array to manage the bounds of the fill operation, improving error checking for static regions.
    - Modified the MakeSIMTLoop method to utilize the new region array for loop variable bounds, enhancing flexibility in kernel generation.
    - Updated the fill and clear functions in fill.py to accept both tir.Buffer and tir.BufferRegion types, improving usability and type handling.
    
    * Refactor Fill Operation and Improve Readability
    
    - Simplified the Fill constructor by enhancing the handling of BufferLoad instances and ensuring proper checks for ramp indices.
    - Improved error messages for region size checks to enhance clarity.
    - Cleaned up formatting in the Fill method for better readability.
    - Added a blank line in the matmul function test to improve code organization.
    - Introduced a blank line in the fill function to enhance readability in fill.py.
    
    * Add matrix multiplication functionality and test in TileLang
    
    - Introduced a new test file `test_tilelang_language_clear.py` that implements a matrix multiplication function using TileLang's primitives.
    - The `matmul` function defines a kernel for performing tile-level GEMM operations with customizable block sizes and data types.
    - Added a `run_matmul` function to compile and execute the kernel, along with a test function to validate the implementation.
    - Updated the `__init__.py` in the utils module to include `map_torch_type`, enhancing type handling for tensor operations.
    
    * lint fix
    47caf219
elem.cc 16.1 KB