mirror of
https://github.com/tile-ai/tilelang.git
synced 2026-10-22 06:50:25 +08:00
* [Enhancement] Enhance dequantization examples and utilities - Added a new example for grouped matrix multiplication with experts in `example_dequant_groupgemm_bf16_mxfp4_hopper.py`. - Improved dequantization logic in existing examples by replacing nested loops with vectorized operations for better performance. - Updated `torch_convert_bit_twiddling` function in `utils.py` to utilize parallel processing, enhancing efficiency and clarity in the conversion process. Co-authored-by: Zhengju Tang <97930865+tzj-fxz@users.noreply.github.com> * fix typos in docstrings * remove redundant code * [Format] Unreproducible debug with T.print * [BugFix] Correct dtype in ref dequantize; larger data distribution * [Format] * [Refactor] Clean up and optimize example_dequant_groupgemm_bf16_mxfp4_hopper.py and utils.py - Removed unnecessary cache disabling and manual seed setting in the example. - Simplified nested loops into parallelized operations for better readability and performance. - Updated the assertion function in utils.py to print detailed error messages. - Adjusted tensor sizes in examples * [Refactor] Update import path in example_dequant_gemm_fine_grained.py - Changed the import statement for `_tir_packed_to_unsigned_convert` from `bitblas.quantization` to `tilelang.quantize` to reflect the new module structure. * lint * rename and add test * lint * [Feature] Enhance autotuning and configuration generation in example_dequant_groupedgemm_bf16_mxfp4_hopper.py - Added a new function `get_configs()` to generate hyperparameter configurations for tuning. - Updated the `matmul` function to utilize autotuning with the new configurations. - Improve kernel performance via vectorization and threadblock swizzle. - Enhanced the main function to support the new autotuning inputs and updated parameters for better performance. * lint * fix typo * fix typo and lint * make ci format check happy * fix ci --------- Co-authored-by: Zhengju Tang <97930865+tzj-fxz@users.noreply.github.com> Co-authored-by: tzj-fxz <tzjfxz@gmail.com>
48 lines
1.4 KiB
Python
48 lines
1.4 KiB
Python
import tilelang.testing
|
|
|
|
import example_dequant_gemv_fp16xint4
|
|
import example_dequant_gemm_fp4_hopper
|
|
import example_dequant_gemm_bf16_mxfp4_hopper
|
|
import example_dequant_gemm_bf16_mxfp4_hopper_tma
|
|
import example_dequant_groupedgemm_bf16_mxfp4_hopper
|
|
import example_dequant_gemm_w4a8
|
|
|
|
|
|
@tilelang.testing.requires_cuda
|
|
def test_example_dequant_gemv_fp16xint4():
|
|
example_dequant_gemv_fp16xint4.main()
|
|
|
|
|
|
@tilelang.testing.requires_cuda
|
|
@tilelang.testing.requires_cuda_compute_version_ge(9, 0)
|
|
def test_example_dequant_gemm_fp4_hopper():
|
|
example_dequant_gemm_fp4_hopper.main()
|
|
|
|
|
|
@tilelang.testing.requires_cuda
|
|
@tilelang.testing.requires_cuda_compute_version_ge(9, 0)
|
|
def test_example_dequant_gemm_bf16_mxfp4_hopper():
|
|
example_dequant_gemm_bf16_mxfp4_hopper.main()
|
|
|
|
|
|
@tilelang.testing.requires_cuda
|
|
@tilelang.testing.requires_cuda_compute_version_ge(9, 0)
|
|
def test_example_dequant_gemm_bf16_mxfp4_hopper_tma():
|
|
example_dequant_gemm_bf16_mxfp4_hopper_tma.main()
|
|
|
|
|
|
@tilelang.testing.requires_cuda
|
|
@tilelang.testing.requires_cuda_compute_version_ge(9, 0)
|
|
def test_example_dequant_groupedgemm_bf16_mxfp4_hopper():
|
|
example_dequant_groupedgemm_bf16_mxfp4_hopper.main()
|
|
|
|
|
|
@tilelang.testing.requires_cuda
|
|
@tilelang.testing.requires_cuda_compute_version_ge(9, 0)
|
|
def test_example_dequant_gemm_w4a8():
|
|
example_dequant_gemm_w4a8.main()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
tilelang.testing.main()
|