---
id: pr-tilelang-2023
repo: tile-ai/tilelang
pr: 2023
title: '[Codegen] Add lexical_alloc_scope for scoped local variable lifetime'
author: LeiWang1999
date: '2026-04-11'
url: https://github.com/tile-ai/tilelang/pull/2023
source_category: upstream-code
architectures:
- sm100
- sm90
tags:
- fp4
- fp8
- hopper
- mla
- mxfp4
techniques: []
hardware_features:
- fp4
- fp8
- hopper
- mxfp4
kernel_types:
- mla
languages: []
captured_at: '2026-05-16'
status: merged
merge_sha: 853e805b2ae8d1d06cee215367a1bdf775a83058
inclusion_reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.
changed_paths:
- .clang-tidy
- .github/workflows/ci.yml
- .github/workflows/pr-regression-test-bot.yml
- .gitignore
- format.sh
- requirements-lint.txt
- src/op/builtin.h
- src/op/copy.cc
- src/op/gemm_py.cc
- src/op/gemm_sp_py.cc
- src/target/codegen_cuda.cc
- src/target/codegen_hip.cc
- src/transform/lower_opaque_block.cc
- src/transform/plan_update_buffer_allocation_location.cc
- src/transform/reuse_local_descriptor_allocations.cc
- src/transform/storage_rewrite.cc
- testing/python/transform/test_tilelang_transform_lexical_alloc_scope.py
- testing/python/transform/test_tilelang_transform_plan_update_buffer_allocation_location.py
- testing/python/transform/test_tilelang_transform_reuse_local_descriptor_allocations.py
- tilelang/engine/phase.py
- tilelang/transform/__init__.py
artifact_dir: evidence/pull-bundles/tilelang/gh-2023
head_ref_oid: 0a34a6aea5f773bc7454bd51366747f0fb008612
---
# [Codegen] Add lexical_alloc_scope for scoped local variable lifetime

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

- `.clang-tidy`
- `.github/workflows/ci.yml`
- `.github/workflows/pr-regression-test-bot.yml`
- `.gitignore`
- `format.sh`
- `requirements-lint.txt`
- `src/op/builtin.h`
- `src/op/copy.cc`
- `src/op/gemm_py.cc`
- `src/op/gemm_sp_py.cc`
- `src/target/codegen_cuda.cc`
- `src/target/codegen_hip.cc`
- `src/transform/lower_opaque_block.cc`
- `src/transform/plan_update_buffer_allocation_location.cc`
- `src/transform/reuse_local_descriptor_allocations.cc`
- `src/transform/storage_rewrite.cc`
- `testing/python/transform/test_tilelang_transform_lexical_alloc_scope.py`
- `testing/python/transform/test_tilelang_transform_plan_update_buffer_allocation_location.py`
- `testing/python/transform/test_tilelang_transform_reuse_local_descriptor_allocations.py`
- `tilelang/engine/phase.py`
- `tilelang/transform/__init__.py`

## Evidence Bundle

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