---
id: pr-tilelang-1736
repo: tile-ai/tilelang
pr: 1736
title: Add swizzle layout detection and automatic merging for layout conflicts
author: LeiWang1999
date: '2026-01-27'
url: https://github.com/tile-ai/tilelang/pull/1736
source_category: upstream-code
architectures:
- sm90
tags:
- WGMMA
- arch_pipeline
- attention
- compiler_runtime
- gemm_quant
techniques:
- fine-grained-quantization
- pipeline-stages
- swizzling
hardware_features:
- wgmma
kernel_types:
- attention
- compiler
- gemm
- runtime
languages:
- cute-dsl
- ptx
captured_at: '2026-05-16'
status: merged
merge_sha: ea70dadfba7bf5c2611a89c67800d264639a95fa
inclusion_reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.
changed_paths:
- maint/gemm_v2/correctness_evaluation.py
- src/layout/gemm_layouts.cc
- src/layout/layout.h
- src/target/ptx.cc
- src/transform/layout_inference.cc
- tilelang/tileop/gemm/gemm_wgmma.py
artifact_dir: evidence/pull-bundles/tilelang/gh-1736
head_ref_oid: 19686442a9c31cb4ae3f56c83165745d6a46c0bf
---
# Add swizzle layout detection and automatic merging for layout conflicts

- Repository: `tile-ai/tilelang`
- PR: [1736](https://github.com/tile-ai/tilelang/pull/1736)
- 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

- `maint/gemm_v2/correctness_evaluation.py`
- `src/layout/gemm_layouts.cc`
- `src/layout/layout.h`
- `src/target/ptx.cc`
- `src/transform/layout_inference.cc`
- `tilelang/tileop/gemm/gemm_wgmma.py`

## Evidence Bundle

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