---
id: pr-tilelang-2073
repo: tile-ai/tilelang
pr: 2073
title: '[CUDA] Improve int4 GEMM lowering and packed codegen support'
author: LeiWang1999
date: '2026-04-21'
url: https://github.com/tile-ai/tilelang/pull/2073
source_category: upstream-code
architectures:
- sm100
tags:
- benchmark_test
- compiler_runtime
- copy lowering
- gemm
- gemm_quant
- intrinsic
- matmul
techniques:
- fine-grained-quantization
hardware_features: []
kernel_types:
- compiler
- gemm
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 15309f5cba9b975838fe8f7c64e67a6d64e765a7
inclusion_reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.
changed_paths:
- .github/workflows/ci.yml
- examples/gemm_int4/example_tilelang_gemm_int4.py
- src/target/codegen_cuda.cc
- src/tl_templates/cuda/common.h
- src/tl_templates/cuda/instruction/mma.h
- testing/python/amd/test_tilelang_gemm_mfma_intrinsic.py
- testing/python/amd/test_tilelang_gemm_mfma_preshuffle.py
- testing/python/debug/test_tilelang_debug_print.py
- tilelang/intrinsics/mma_macro_generator.py
- tilelang/intrinsics/utils.py
- tilelang/tileop/gemm/gemm_mma.py
- tilelang/utils/target.py
artifact_dir: evidence/pull-bundles/tilelang/gh-2073
head_ref_oid: 37ff0d3694ed2d72dd7bfc34c4b7505b45d74439
---
# [CUDA] Improve int4 GEMM lowering and packed codegen support

- Repository: `tile-ai/tilelang`
- PR: [2073](https://github.com/tile-ai/tilelang/pull/2073)
- Decision: `Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.`
- Reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.

## Changed Paths

- `.github/workflows/ci.yml`
- `examples/gemm_int4/example_tilelang_gemm_int4.py`
- `src/target/codegen_cuda.cc`
- `src/tl_templates/cuda/common.h`
- `src/tl_templates/cuda/instruction/mma.h`
- `testing/python/amd/test_tilelang_gemm_mfma_intrinsic.py`
- `testing/python/amd/test_tilelang_gemm_mfma_preshuffle.py`
- `testing/python/debug/test_tilelang_debug_print.py`
- `tilelang/intrinsics/mma_macro_generator.py`
- `tilelang/intrinsics/utils.py`
- `tilelang/tileop/gemm/gemm_mma.py`
- `tilelang/utils/target.py`

## Evidence Bundle

`evidence/pull-bundles/tilelang/gh-2073`
