• Chaofan Lin's avatar
    [Bugfix] Fix Benchmark/Example Code for Autotuning (#254) · 0430cfe7
    Chaofan Lin authored
    
    
    * fix tune args
    
    * lint
    
    * Refactor gemm example and autotuner logging
    
    - Updated `ref_program` in `example_gemm.py` to return the result of matrix multiplication instead of modifying an input parameter.
    - Changed logging filename in `__init__.py` from 'out.log' to 'autotuner.log' for better clarity.
    - Modified JIT kernel compilation process to include `out_idx` directly in the adapter creation, enhancing flexibility.
    - Improved validation of `result_idx` in `BaseKernelAdapter` to ensure it falls within valid bounds.
    
    * Refactor `ref_program` in `benchmark_matmul_intrinsic.py` to use the `@` operator for matrix multiplication instead of `torch.matmul`, simplifying the implementation by removing the unused parameter `C`.
    
    ---------
    Co-authored-by: default avatarLeiWang1999 <leiwang1999@outlook.com>
    0430cfe7
example_mha_fwd_bhsd.py 9.5 KB