Repository navigation
[Ascend] Preserve configuration register phases in manual pipelines - #3624
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Python scheduler phase constraints tilelang/ascend/transform/z3_scheduler.py |
The Python scheduler accepts register phase dependencies, validates their inputs, applies modulo-phase constraints during feasibility checks, and includes them in verbose output and saved metadata. |
Register effect analysis and scheduler wiring src/ascend/transform/auto_schedule.cc |
The loop scheduler analyzes configuration-register effects and passes physical-phase dependencies to the Python scheduler. Unresolved effects and loop-control ordering retain logical dependencies. |
Scheduling tests and Stage documentation testing/ascend/auto_schedule/test_special_registers.py, testing/ascend/auto_schedule/test_schedule_integration.py, tilelang/ascend/language/schedule_hint.py |
Tests cover staged register ordering, conservative cases, runtime padding behavior, infeasible schedules, and scalar-buffer dependencies. The Stage documentation describes shared register values and dependency rules. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant LoopScheduler
participant RegisterEffectAnalysis
participant z3_schedule_loop_ffi
participant z3_schedule_loop_python
LoopScheduler->>RegisterEffectAnalysis: Analyze configuration-register effects
RegisterEffectAnalysis-->>LoopScheduler: Return register phase dependencies
LoopScheduler->>z3_schedule_loop_ffi: Pass serialized dependency tuples
z3_schedule_loop_ffi->>z3_schedule_loop_python: Forward register_phase_deps
Possibly related PRs
- tile-ai/tilelang#3678: Its FlashMLA kernels use the manual
T.Stagepipeline behavior affected by these configuration-register phase dependencies.
Suggested labels: bug, python, ascend, documentation
Merge Risk: 
Minimal · up to 9730b
-
No merge-blocking risk was identified. Ascend runtime validation remains advisable.
Pre-merge checks: 
5
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
Manual
T.Stagepipelines can reject valid configuration set/use groups when their stages are nonadjacent or decrease in source order. Hardware configuration registers have one physical value per core, so their dependencies must preserve the reaching setter and the next overwrite within the pipeline's issue phases.Track HF32 mode, MMAD direction, padding, and atomic mode per core, and construct phase constraints for each setter/consumer group. Preserve conservative logical dependencies for conditional setters and opaque effects, along with the existing scalar-buffer and control/pipe-fence dependencies. Document the stage semantics for configuration changes.
Summary
.clang-tidyconfiguration.C++ style / lint notes
The PR changes C++ code and adds
.clang-tidy. It does not change rules indocs/developer_guide/cpp_style.md. CI includes the “C++ API Style Audit (warning only)” step. No audit findings or lint results were supplied, so introduced warning counts are unavailable. No build or test results were supplied.