---
id: pr-tilelang-1200
repo: tile-ai/tilelang
pr: 1200
title: '[Refactor] Add kernel selection option for GEMM v1 in environment settings'
author: LeiWang1999
date: '2025-11-12'
url: https://github.com/tile-ai/tilelang/pull/1200
source_category: upstream-code
architectures:
- sm100
tags:
- fused-op
techniques:
- kernel-fusion
hardware_features: []
kernel_types:
- gemm
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 8fbe1b3a8338d1f2f031df7a33b5d87f8c2458e4
inclusion_reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.
changed_paths:
- .gitignore
- CMakeLists.txt
- examples/attention_sink/example_gqa_sink_bwd_bhsd.py
- examples/attention_sink/example_gqa_sink_fwd_bhsd_wgmma_pipelined.py
- examples/attention_sink/example_mha_sink_bwd_bhsd.py
- examples/attention_sink/example_mha_sink_fwd_bhsd.py
- examples/attention_sink/example_mha_sink_fwd_bhsd_wgmma_pipelined.py
- examples/deepseek_v32/test_tilelang_example_deepseek_v32.py
- examples/linear_attention/example_linear_attn_fwd.py
- examples/linear_attention/example_retention_fwd.py
- examples/warp_specialize/example_warp_specialize_gemm_barrierpipe_stage2.py
- maint/gemm_v2/correctness_evaluation.py
- maint/gemm_v2/correctness_evaluation_sm70.py
- src/op/gemm.cc
- src/op/gemm.h
- src/op/gemm_py.cc
- src/op/gemm_py.h
- src/op/gemm_sp.cc
- src/op/gemm_sp.h
- src/op/operator.h
- src/target/codegen_hip.cc
- src/tl_templates/cuda/instruction/mma.h
- src/tl_templates/cuda/reduce.h
- src/transform/legalize_negative_index.cc
- src/transform/lower_opaque_block.cc
- src/transform/lower_tile_op.cc
- src/transform/merge_shared_memory_allocations.cc
- src/transform/storage_rewrite.cc
- testing/python/dynamic/test_tilelang_dynamic_symbolic.py
- tilelang/env.py
- tilelang/intrinsics/mfma_macro_generator.py
- tilelang/intrinsics/mma_layout.py
- tilelang/intrinsics/mma_macro_generator.py
- tilelang/intrinsics/mma_sm70_macro_generator.py
- tilelang/intrinsics/tcgen05_macro_generator.py
- tilelang/intrinsics/utils.py
- tilelang/intrinsics/wgmma_macro_generator.py
- tilelang/language/builtin.py
- tilelang/language/gemm.py
- tilelang/layout/swizzle.py
- tilelang/tileop/gemm/__init__.py
- tilelang/tileop/gemm/gemm_base.py
- tilelang/tileop/gemm/gemm_mfma.py
- tilelang/tileop/gemm/gemm_mma.py
- tilelang/tileop/gemm/gemm_mma_sm70.py
- tilelang/tileop/gemm/gemm_tcgen05.py
- tilelang/tileop/gemm/gemm_wgmma.py
- tilelang/utils/__init__.py
- tilelang/utils/language.py
artifact_dir: evidence/pull-bundles/tilelang/gh-1200
head_ref_oid: 502d71fc0fd444b947ecdb8b726da2b18523a2ea
---
# [Refactor] Add kernel selection option for GEMM v1 in environment settings

- Repository: `tile-ai/tilelang`
- PR: [1200](https://github.com/tile-ai/tilelang/pull/1200)
- Decision: `Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.`
- Reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.

## Changed Paths

- `.gitignore`
- `CMakeLists.txt`
- `examples/attention_sink/example_gqa_sink_bwd_bhsd.py`
- `examples/attention_sink/example_gqa_sink_fwd_bhsd_wgmma_pipelined.py`
- `examples/attention_sink/example_mha_sink_bwd_bhsd.py`
- `examples/attention_sink/example_mha_sink_fwd_bhsd.py`
- `examples/attention_sink/example_mha_sink_fwd_bhsd_wgmma_pipelined.py`
- `examples/deepseek_v32/test_tilelang_example_deepseek_v32.py`
- `examples/linear_attention/example_linear_attn_fwd.py`
- `examples/linear_attention/example_retention_fwd.py`
- `examples/warp_specialize/example_warp_specialize_gemm_barrierpipe_stage2.py`
- `maint/gemm_v2/correctness_evaluation.py`
- `maint/gemm_v2/correctness_evaluation_sm70.py`
- `src/op/gemm.cc`
- `src/op/gemm.h`
- `src/op/gemm_py.cc`
- `src/op/gemm_py.h`
- `src/op/gemm_sp.cc`
- `src/op/gemm_sp.h`
- `src/op/operator.h`
- `src/target/codegen_hip.cc`
- `src/tl_templates/cuda/instruction/mma.h`
- `src/tl_templates/cuda/reduce.h`
- `src/transform/legalize_negative_index.cc`
- `src/transform/lower_opaque_block.cc`
- `src/transform/lower_tile_op.cc`
- `src/transform/merge_shared_memory_allocations.cc`
- `src/transform/storage_rewrite.cc`
- `testing/python/dynamic/test_tilelang_dynamic_symbolic.py`
- `tilelang/env.py`
- `tilelang/intrinsics/mfma_macro_generator.py`
- `tilelang/intrinsics/mma_layout.py`
- `tilelang/intrinsics/mma_macro_generator.py`
- `tilelang/intrinsics/mma_sm70_macro_generator.py`
- `tilelang/intrinsics/tcgen05_macro_generator.py`
- `tilelang/intrinsics/utils.py`
- `tilelang/intrinsics/wgmma_macro_generator.py`
- `tilelang/language/builtin.py`
- `tilelang/language/gemm.py`
- `tilelang/layout/swizzle.py`
- `tilelang/tileop/gemm/__init__.py`
- `tilelang/tileop/gemm/gemm_base.py`
- `tilelang/tileop/gemm/gemm_mfma.py`
- `tilelang/tileop/gemm/gemm_mma.py`
- `tilelang/tileop/gemm/gemm_mma_sm70.py`
- `tilelang/tileop/gemm/gemm_tcgen05.py`
- `tilelang/tileop/gemm/gemm_wgmma.py`
- `tilelang/utils/__init__.py`
- `tilelang/utils/language.py`

## Evidence Bundle

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