refactor: separate Ascend TileLang DSL implementations from AOT descriptors. - #2259
Merged
zhang-minchao merged 2 commits intoAug 18, 2026
Merged
Conversation
zhang-minchao
requested review from
DongheJin,
DragonFive,
JimHsiung,
Kang-Meng,
liujinguang0125,
liutongxuan,
ustcfy,
xiao-yu-chen,
yingxudeng and
yinjiawei01
as code owners
August 18, 2026 03:43
zhang-minchao
force-pushed
the
refactor/python-tilelang-kernels
branch
from
August 18, 2026 03:47
1703a8b to
b42b65c
Compare
- initialize platform kernel packages explicitly after native operator registration - move TileLang DSL/JIT implementations under kernels_npu and keep compiler-owned AOT descriptors thin - preserve AOT registry behavior while updating cache dependencies, documentation, and tests
- drop standalone runtime and layout tests that are not part of the test suite - keep existing C++ tests aligned with explicit Python runtime initialization
zhang-minchao
force-pushed
the
refactor/python-tilelang-kernels
branch
from
August 18, 2026 05:46
b42b65c to
1990b12
Compare
JimHsiung
approved these changes
Aug 18, 2026
yingxudeng
approved these changes
Aug 18, 2026
AmpereKowk
pushed a commit
to AmpereKowk/xllm
that referenced
this pull request
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xllm/python/kernels_npu/tilelang.xllm/compiler/tilelang/targets/ascend/aot.torch.ops.xllm_opsregistration.Motivation
The previous
compiler/tilelang/targets/ascend/kernelsmodules mixed two responsibilities:This made Python JIT callers depend on the compiler package. Moving the DSL implementation directly under
kernels_npuwould previously also trigger the NPU semantic package and require the native xLLM operators while the C++ binary was still being built.This refactor separates those responsibilities and keeps the dependency direction one-way:
The TileLang leaf package does not depend on the NPU semantic API,
torch.ops.xllm_ops, the AOT compiler, or the native xLLM extension.Key Changes
xllm/python/kernels_npu/tilelangbecomes the owner of TileLang DSL builders, JIT launchers, and implementation-local helpers.xllm/compiler/tilelang/targets/ascend/aotowns only AOT descriptors and imports the shared TileLang builders.xllm.python.initialize_runtime()selects and initializes the active platform kernel package after native operator registration.xllm/compiler/tilelang/targets/ascend/kernelspackage is removed.Validation
mtp_async_input_builder_testpasses all 8 tests.npu_xllm_ops_testpasses all 6 tests.Reviewer Notes
Please focus on the package dependency direction, the native-operator/runtime initialization order, and the split between reusable DSL implementations and compiler-only AOT descriptors.