[VPTO] Add scheduler analysis framework - #1202
Conversation
mouliangyu
left a comment
There was a problem hiding this comment.
Blocking issue: the scheduler pass only analyzes pto.vecscope / pto.strict_vecscope bodies, while pto.set_flag and pto.wait_flag are required to remain outside the vector scope and synchronize the scope with the surrounding pipes. PTOInferVPTOVecScope also treats these operations as scope boundaries.
The new dependency tests place set/wait operations inside a vecscope (for example, event_signal_wait, dynamic_event_may_match, and event_pipe_order) in order to exercise event/pipe DAG edges. Those fixtures use an illegal VPTO shape and therefore do not demonstrate coverage of any legal emission path. The event/set-wait DAG handling is unreachable for the legal input accepted by this vecscope-only scheduler.
Please remove the illegal scope-internal set/wait fixtures and the corresponding out-of-scope handling from this phase. If the current verifier still accepts set/wait inside a vecscope, that is a verifier gap and should be rejected explicitly rather than treated as scheduler input. Event/pipe scheduling can be introduced when a legal scheduling region is expanded to include those operations.
mouliangyu
left a comment
There was a problem hiding this comment.
复核结论:最新提交已补上 vecscope 内同步操作的 verifier 约束,build-and-test 已通过;未发现当前会导致错误代码生成的 blocking correctness issue。
发现以下问题:
-
[P2] PR 删除了整个
docs/vpto-spec.md(1549 行),但新增的docs/designs/vpto-scheduler-framework.md只是调度器设计文档,并不是 VPTO/PTO micro instruction 规范的替代品。README 仍将该能力作为公开使用面,release 文档也继续依赖 micro-ISA 规范体系。若删除是有意迁移,需要明确新的 canonical 文档入口;否则这是与本 PR 无关的文档回归。 -
[P2]
lib/PTO/IR/VPTOScheduling.cpp:318-334的注册覆盖率审计从未递增coverage.boundary或填充boundaryOps。任何实现VPTOSchedulingOpInterface且返回SchedulingBoundary的已注册操作,都会被错误地统计为 unclassified(或无法反映 boundary)。当前注册表恰好没有触发该分支,因此现有测试看不出问题,但审计 API 的结果不符合其 contract。
当前 head: 8f0a541b64dd5f399220bb126417b6558b99be0e。
A5 板测失败
失败用例
|
A3 板测失败
日志尾部 |
Summary
Implement phase one of the VPTO scheduler framework described in #1143 .
This phase establishes the scheduling abstractions, dependency information, target model, and analysis infrastructure required by the full scheduler. It only analyzes operations inside
pto.vecscopeandpto.strict_vecscope; it does not select a new schedule or modify IR.Key changes
VPTOSchedulingOpInterfaceand normalized operation-local scheduling semantics.off,analyze, andonscheduler modes, restricted to A5 vector kernels.Testing