Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1448 commits
Select commit Hold shift + click to select a range
6382616
实现(pa-scheduler):闭合S3a共享执行包接入与A5内存合同
Aug 2, 2026
94d418b
文档(pa-scheduler):依据EfDrain实测修正S3b发现协议
Aug 2, 2026
db0860f
文档(pa-scheduler):撤销全核plan游标并收敛S3b候选登记合同
Aug 2, 2026
1a19bbb
实现(pa-scheduler):以Submit当场登记闭合S3b两候选发现
Aug 2, 2026
13f84f0
修正(pa-scheduler):闭合S3b fatal首错与不可逆边界
Aug 2, 2026
381773c
修正(pa-scheduler):放宽S3b插入等待并闭合B1异核执行
Aug 2, 2026
6110ccf
验证(pa-scheduler):闭合S3b异核执行B256规模门槛
Aug 2, 2026
271ce59
修正(pa-scheduler):区分A5执行终态与主机缓存快照
Aug 2, 2026
4651c2e
实现(pa-scheduler):闭合S4双候选动态执行仲裁CPU门槛
Aug 2, 2026
f0190dc
验证(pa-scheduler):闭合S4动态仲裁A5规模门槛
Aug 2, 2026
3acb59b
实现(pa-scheduler):闭合S5a跨角色构建CPU门槛
Aug 2, 2026
ccf5a83
验证(pa-scheduler):闭合S5a跨角色构建A5门槛
Aug 2, 2026
d0dbc18
实现(pa-scheduler):闭合S5b全Scalar构建CPU门槛
Aug 2, 2026
e426898
验证(pa-scheduler):闭合S5b全Scalar构建A5门槛
Aug 2, 2026
6ff27b8
文档(pa-scheduler):移除协程重叠目标并进入S6性能优化
Aug 2, 2026
58f3543
性能(pa-scheduler):跳过无本核执行工作的EfDrain入口
Aug 2, 2026
de4a402
性能(pa-scheduler):消除执行扫描入口的集中式fatal读取
Aug 2, 2026
c338774
性能(pa-scheduler):避开未就绪fanin轮询的fatal原子热点
Aug 2, 2026
1bffd5d
记录(pa-scheduler):收口执行队首阻塞负向实验
Aug 2, 2026
952b95c
记录(pa-scheduler):撤回ready-only执行候选实验
Aug 2, 2026
899e810
记录(pa-scheduler):撤回fanin轮询降频候选
Aug 2, 2026
54ff0fc
性能(pa-scheduler):为K2执行仲裁增加主候选优先
Aug 2, 2026
c5cc498
记录(pa-scheduler):撤回K2次候选首读前让出实验
Aug 2, 2026
461b1b9
验证(atomic):建立one-shot CAS旁路预过滤证据
Aug 2, 2026
04752a9
记录(pa-scheduler):撤回Claim旁路预过滤实验
Aug 2, 2026
92fed13
Add: selective two-level per-task CAS tournament design doc
hengliao1972 Aug 3, 2026
4593c88
Update: add same-core scalar coroutine claim interleave chapter
hengliao1972 Aug 3, 2026
731b0ce
Add: 建立 shared PA 随机构参等价门槛
Aug 3, 2026
ac477b0
Add: 建立低原子Build发放协议门槛
Aug 3, 2026
52408e4
Test: 验证混合96核Build发放原子拓扑
Aug 3, 2026
cf8c50b
Test: 闭合低原子发放后的K2任务发现
Aug 3, 2026
35fd3b8
Add: 发布紧凑的shared Build任务计划
Aug 3, 2026
22b0b07
Refactor: 以只读计划驱动K2任务发现
Aug 3, 2026
f57d55f
Update: 以中央票据替换 shared Build 全量回放
Aug 3, 2026
957580e
Add: 建立稳定GM描述符引用的执行包协议
Aug 3, 2026
12daeaa
记录:撤回正式PA描述符引用候选
Aug 3, 2026
19deca1
修正:收敛泳道split-finish结构门槛
Aug 3, 2026
afad388
记录:撤回中央票据单CAS发布候选
Aug 3, 2026
2e0d5ec
Add: measure same-address Atomic contention across DIEs
Aug 3, 2026
1def6f2
Update: 双执行槽并统一跨核端到端性能口径
Aug 3, 2026
361906e
优化:收敛跨核执行热路径的终止原子读取
Aug 3, 2026
7efdcc3
优化:降低FinalDrain终止状态轮询频率
Aug 3, 2026
4431dbf
记录:撤回WinnerBody终止原子读候选
Aug 3, 2026
308f26c
优化:复用执行扫描快照消除重复原子读取
Aug 3, 2026
2d0e6c9
记录:撤回shared heap vend前置读取候选
Aug 3, 2026
4fdfe90
记录:撤回发布Exchange非等待候选
Aug 3, 2026
74c9793
优化:隔离执行排空的到达与释放控制行
Aug 3, 2026
9dea7d8
优化:分片执行排空到达竞争
Aug 3, 2026
4efd9eb
记录:撤回winner重复fatal读取候选
Aug 3, 2026
ad22756
优化:分片执行排空释放竞争
Aug 3, 2026
2fda405
优化:改为单向执行排空收口
Aug 3, 2026
0ad0070
记录:撤回无收益的插入完成CAS改造
Aug 3, 2026
88830ca
优化:汇总完成数消除终态原子全表扫描
Aug 3, 2026
72e7363
记录:撤回两级终态屏障的集中扇出候选
Aug 3, 2026
bb716cb
记录:否决按段领取中央Build任务的方案
Aug 3, 2026
f89fbf1
记录:撤回Fanin发布位重复读取候选
Aug 3, 2026
f5e8fd8
优化:无回收TensorMap查询省略head原子读取
Aug 3, 2026
a0e7979
观测:端到端性能口径前移到startup
Aug 3, 2026
a6120a4
记录:否决startup两级分组屏障候选
Aug 3, 2026
29b4a8d
记录:用完整周期复审终态root直接扇出
Aug 3, 2026
253a2e8
优化:删除winner重复fatal返回型读取
Aug 4, 2026
5c0d7fd
记录:用完整周期复审Fanin发布位回读
Aug 4, 2026
a7dc1ac
记录:用完整周期复审插入完成CAS返回依赖
Aug 4, 2026
f45f7f6
记录:用完整周期复审output发布非返回候选
Aug 4, 2026
fe906c0
记录:用完整周期复审unique-ticket单CAS构建
Aug 4, 2026
08ffc53
记录:封账完整周期历史优化复核
Aug 4, 2026
32d146c
Fix: 解除公共执行收口对PA五段任务图的依赖
Aug 4, 2026
bea537d
重构:将A5单通道执行放置策略移出PA适配器
Aug 4, 2026
76e1c19
记录:完成跨核调度优化的全算子泛化复核
Aug 4, 2026
46c2f7c
优化:以执行排空汇合替代重复ReplayDone屏障
Aug 4, 2026
5b6a348
观测:用既有边界标识跨核调度大块空白
Aug 4, 2026
1f3c531
优化:降低中央Build循环的终止原子读取频率
Aug 4, 2026
b3129df
观测:补齐FinalDrain大块开销归因
Aug 4, 2026
38283a5
优化:执行核直接消费共享执行包以消除二次GM拷贝
Aug 4, 2026
b93d41c
记录:证伪completion前缀位消减空TensorMap查询
Aug 4, 2026
4c25f76
优化:复用插入完成链删除SharedOutputRef重复发布读取
Aug 4, 2026
a9629e5
文档:补充 shared cross-core 与 same-core 调度差异分析
Aug 4, 2026
fb36776
性能:复用跨核执行包已验证布局
Aug 4, 2026
a599a3e
性能:复用Claim元数据消除执行前重复校验
Aug 4, 2026
276e562
记录:证伪Claim后延迟token复扫
Aug 4, 2026
342df69
重构:删除执行token的废弃私有payload
Aug 4, 2026
86e83f2
性能:用非返回型FetchAdd缩短共享TensorMap插入链
Aug 4, 2026
03e0e8f
架构:发布AIC与AIV双中央Execute静态计划
Aug 4, 2026
5e2db8d
架构:接入AIC与AIV双中央Execute ticket
Aug 4, 2026
21dc431
验证:闭合双中央Execute ticket的A5证据
Aug 4, 2026
317f3b6
性能:以三token前视缩短跨核执行尾部
Aug 4, 2026
94bd230
分析:冻结分组有序Register候选协议
Aug 4, 2026
946d2cb
验证(atomic): 以128B冲突单元指导地址隔离
Aug 4, 2026
cb939f5
优化(shared PA): 按128B冲突单元隔离热原子地址
Aug 4, 2026
b5cea55
性能:隔离每任务插入完成字的128B原子冲突单元
Aug 4, 2026
324ebe0
性能:以占用证据将跨核执行前视扩为四槽
Aug 4, 2026
b08c898
性能(cross-core): 未发布执行任务停止单边界连续预领
Aug 4, 2026
c516e64
记录(cross-core): 收敛本地候选至三项通用收益
Aug 5, 2026
db70ee6
性能(cross-core): 将Build正常态fatal观察周期收敛到16
Aug 5, 2026
cfa50f2
性能(cross-core): 合并writer掩码校验与delta构造扫描
Aug 5, 2026
70d0f8a
文档(cross-core): 收口AIC执行提前受阻原因与边界
Aug 5, 2026
83240bd
文档(cross-core): 归档三版执行提前候选方案
Aug 5, 2026
64e3d5d
Add: 建立 SIMT 跨核调度设计与实施基线
Aug 5, 2026
399d570
Add: 建立 SIMT 跨核调度 S0 协议与 A5 可见性基线
Aug 5, 2026
975da5e
Add: 完成 SIMT 跨核调度 S1 单 Vector 闭环
Aug 5, 2026
2e3034d
Add: 完成 SIMT 跨核调度 S2 单 Cube 闭环
Aug 5, 2026
5dff112
Add: 完成 SIMT 跨核调度 S3 双任务闭环
Aug 5, 2026
dc61c01
Test: 增加 SIMT 原子指令满并发验证
Aug 5, 2026
a29fa08
feat(pa_scheduler): 验证 SIMT 多任务构建与单令牌执行
Aug 5, 2026
49d0134
fix(pa_scheduler): 将 S4 构建任务交错分布到四个 warp
Aug 5, 2026
c281b11
Add: 验证同 warp 串行与跨 warp 独立推进
Aug 5, 2026
974f663
feat(pa_scheduler): 完成纯 SIMT 64-warp 的完整 PA 调度
Aug 5, 2026
0a28385
feat(pa_scheduler): 完成双 VF 纯 SIMT 的 PA 全量竞争构建
Aug 5, 2026
c4f8836
Add: 完成纯 SIMT UBUF 单槽调度探针
Aug 5, 2026
a20a29e
Add: 完成纯 SIMT UBUF 四槽调度探针
Aug 5, 2026
da5005f
优化 cross-core SharedOutput descriptor 原位构造
Aug 6, 2026
ddbb51a
Update: 归档 cross-core AIC 提前执行反例
Aug 6, 2026
77d14fa
Merge: 合入 fdwic-swimlane-deps 远端最新 cross_core 优化
Aug 6, 2026
c53ebc0
记录(cross-core): 否决 BUILT-only 全局执行队列
Aug 6, 2026
f1614ea
记录(cross-core): 否决 AIC Execute-only 角色隔离
Aug 6, 2026
ae741ac
Add: 补齐 SIMT Direct-GM atomic/DCCI 泳道
Aug 6, 2026
be63ed7
Merge remote-tracking branch 'origin/fdwic-swimlane-deps' into fdwic-…
Aug 6, 2026
41f5dee
Update: 收敛 Direct-GM 双 AIV 构建与泳道
Aug 6, 2026
b3a4b7d
perf: 参数化 Direct-GM 多 AIV 构建并收敛至 2.07ms
Aug 6, 2026
79d1b1f
perf: 将 Direct-GM 稀疏写者链优化至 0.71ms
Aug 6, 2026
99367f8
feat: 完成 U2 四槽 UBUF 完整 PA 调度
Aug 6, 2026
1ef5744
perf: 通用化SIMT writer提交并优化UBUF等待
Aug 6, 2026
c1b3d1e
分析(cross-core): 量化 Build 释放与 Execute 调度上界
Aug 6, 2026
1e1afef
记录(cross-core): 否决 ld_dev 预筛严格插入完成字
Aug 6, 2026
ff03f16
构建(cross-core): 发布稀疏 metadata writer 只读计划
Aug 6, 2026
e87a9d6
优化(cross-core): 将严格插入链收敛到真实 metadata writer
Aug 6, 2026
97b18e9
优化(cross-core): 按真实metadata消费缩减前缀等待
Aug 6, 2026
2cb9254
优化(cross-core): 合并writer intent校验与delta构造
Aug 6, 2026
64f4537
优化(cross-core): 将writer摘要校验移出逐task热路
Aug 6, 2026
1b16327
记录(cross-core): 否决逐task joint状态写入消减
Aug 6, 2026
2420694
记录(cross-core): 否决payload重复布局校验消减
Aug 6, 2026
8de210c
优化(cross-core): 复用不可变执行计划头校验
Aug 6, 2026
25af2f7
记录(cross-core): 否决token路由计划头复用
Aug 6, 2026
aa8814a
记录(cross-core): 否决payload route重复解析消减
Aug 6, 2026
5d10e31
优化(cross-core): 按函数条带批量领取执行任务
Aug 6, 2026
a723e19
记录(cross-core): 否决按核静态均分执行票据
Aug 6, 2026
6d7b511
记录(cross-core): 否决三项Execute动态批次
Aug 6, 2026
0511dd5
优化(cross-core): 启动偏斜期间先推进Build
Aug 6, 2026
7ee7e02
优化(cross-core): 错开FinalDrain终止原子轮询
Aug 6, 2026
a53a18b
Update: 延后首次Execute准入观察
Aug 6, 2026
8043c8d
Refactor: 移除PA固定DAG分析脚本
Aug 6, 2026
7e17d06
优化(a5): 隔离shared同核热原子地址
Aug 6, 2026
016ece5
优化:按symbol解开SIMT writer链并将GM降至0.495ms
Aug 6, 2026
572877c
优化:扩展SIMT构建至32路并增加trace-off构建包络
Aug 7, 2026
8dee343
文档:补全四种TensorMap调度方案设计对比
Aug 7, 2026
6789875
完善:统一SIMT真实负载与物理Scalar泳道展示
Aug 7, 2026
f4b658e
Add: 建立Scalar Cross-Core DAG设计基线
Aug 7, 2026
01d4b56
Add: 隔离Scalar Cross-Core DAG实现基线
Aug 7, 2026
1065767
Add: 建立动态per-symbol DAG推导原语
Aug 7, 2026
26d2b49
Add: 接入Scalar动态per-symbol writer协议
Aug 7, 2026
4f4fd97
Refactor: 删除host metadata DAG权威
Aug 7, 2026
10f2531
Test: 闭合Scalar DAG双CCEC产物
Aug 7, 2026
72ccb88
Test: 闭合Scalar DAG真实A5正确性与性能
Aug 7, 2026
7992e8f
Test: 闭合Scalar DAG泳道协议与A5证据
Aug 7, 2026
0995da8
Test: 对齐Scalar与SIMT完整调度计时口径
Aug 7, 2026
0b612c6
优化:消除DAG TensorAt重复GM解码
Aug 7, 2026
23b4cb8
优化:以紧凑writer集合加速DAG前驱搜索
Aug 7, 2026
53fc2c7
优化:直接从真实TaskArgs构建DAG
Aug 7, 2026
f36e7c4
优化:精简DAG历史writer意图解码
Aug 7, 2026
f0d703b
优化:快速拒绝无writer的DAG历史候选
Aug 7, 2026
b5f8da6
优化:复用DAG结果生成writer提交计划
Aug 7, 2026
ffe47b0
优化:DAG临时对象只初始化有效前缀
Aug 7, 2026
8101f08
优化:由schema直接求解ordinary writer前驱
Aug 7, 2026
0128d06
优化:shared heap直接消费RMW旧值
Aug 7, 2026
2432a14
优化DAG执行包的不可变描述符传递
Aug 7, 2026
d2c7945
优化:去除dispatched metadata重复fatal读取
Aug 7, 2026
2ff5b41
优化:移除shared heap诊断性全局vend原子
Aug 7, 2026
7c5b401
记录:收敛SIMT借鉴试验并保留S16最优基线
Aug 8, 2026
7db457e
Test: 留档Scalar DAG S16泳道图
Aug 8, 2026
e5c0d83
Add: 新增 SIMT 跨核串行 TensorMap 调度原型
Aug 8, 2026
5268dd6
Refactor: 规范五种调度模式的独立验证目录
Aug 8, 2026
eb756bd
Test: 增加 AICPU 短负载 PA 对照场景
Aug 8, 2026
c66f6d2
功能:建立FDWIC五种调度模式的独立构建入口
Aug 8, 2026
77aabc0
功能:锁定FDWIC五种调度器的跨镜像ABI身份
Aug 8, 2026
3f3576b
功能:建立跨核调度的通用不可变执行包协议
Aug 8, 2026
4eee7fb
功能:拆分跨核任务的构建抢占与执行包发布
Aug 8, 2026
09a633a
功能:建立跨核动态Submit的共享输出发布协议
Aug 8, 2026
d1fde80
功能:建立跨核调度的通用有序共享TensorMap
Aug 8, 2026
be1053b
功能:接通cross_core_ordinary真实动态Submit链路
Aug 8, 2026
80ecf12
功能:闭合cross_core_ordinary通用compete-first协议
Aug 8, 2026
23fb8de
修复:区分CCEC函数编号与模拟器函数地址合同
Aug 8, 2026
405c060
功能:闭合cross_core_ordinary真实PA执行链路
Aug 8, 2026
4ecc6c2
功能:建立cross_core_dag通用writer元数据协议
Aug 8, 2026
197d800
功能:建立cross_core_dag独立状态与复位合同
Aug 8, 2026
2d0e042
Update: 接通 cross_core_dag 真实动态 Submit
Aug 8, 2026
2843d82
Add: 建立真实SIMT动态构建请求协议
Aug 8, 2026
7cf087c
Add: 建立SIMT普通模式独立状态与复位合同
Aug 8, 2026
b13f1b1
Add: 建立SIMT动态Submit真实参数快照
Aug 8, 2026
f20522e
功能:闭合simt_cross_core_ordinary真实动态调度链路
Aug 9, 2026
ba0abef
功能:建立SIMT DAG独立状态与复位合同
Aug 9, 2026
8bd60f3
功能:接通SIMT DAG动态Submit与模拟器语义
Aug 9, 2026
8d46495
功能:闭合simt_cross_core_dag真实动态调度链路
Aug 9, 2026
af29baa
性能:建立cross-core启动到FinalDrain端到端时钟
Aug 9, 2026
bef870c
文档:固定四模式Simpler迁移首轮性能基线
Aug 9, 2026
b677592
性能:按算法特性扩展SIMT构建核拓扑
Aug 9, 2026
e8d6bdd
文档:记录SIMT DAG精确索引候选的性能否决
Aug 9, 2026
ea933c3
性能:消除SIMT DAG不可变控制字的重复返回型读取
Aug 9, 2026
9180463
文档:记录owner边界剪枝的端到端性能否决
Aug 9, 2026
54532cd
性能:让唯一SIMT构建者直接发布Built执行包
Aug 9, 2026
74449da
性能:平衡SIMT DAG构建与执行核供给
Aug 9, 2026
7337dfa
文档:记录SIMT DAG增加warp的性能否决
Aug 9, 2026
7c44dbe
Update: 记录SIMT DAG元数据前缀性能否决
Aug 9, 2026
52264b5
Update: 合并SIMT DAG同任务依赖扫描
Aug 9, 2026
e88aaaa
Update: 记录SIMT普通模式构建核拓扑扫描
Aug 9, 2026
0b18ee8
Fix: 去除 cross-core replay 全核输出等待
Aug 9, 2026
1fff6fe
Update: 允许源码注释使用中文
Aug 9, 2026
59db988
Update: 为 cross-core DAG 启用延迟输出引用
Aug 9, 2026
eaa560d
Fix: 收窄 SIMT ordinary 输出描述符等待
Aug 9, 2026
8eb83a6
Update: 为 SIMT DAG 启用延迟输出引用
Aug 9, 2026
7bd1bf7
Update: 为 cross-core Build 引入通用两级仲裁
Aug 9, 2026
b962521
Update: 为 SIMT request publisher 复用两级仲裁
Aug 9, 2026
3fd40d4
Update: 收敛 SIMT DAG 的 Execute 两级仲裁
Aug 9, 2026
4c3c16f
Test: 扩充四种调度模式的通用边界矩阵
Aug 9, 2026
d68029a
Docs: 记录缩减 replay 后统一执行的失败边界
Aug 9, 2026
f28de99
Update: 延迟解析 SIMT request 的共享输出引用
Aug 9, 2026
d0ac94a
Fix: 完善四种调度模式的 task 容量边界
Aug 9, 2026
5c03ae3
Perf: 为 SIMT DAG 引入分引擎 Execute ticket
Aug 9, 2026
8cdcfe2
Docs: 记录单 replay 规划核的性能回退
Aug 9, 2026
a17d60b
Docs: 记录确定性 request publisher 的无收益结果
Aug 9, 2026
c08da0b
Perf: 消除 SIMT DAG 查询区域的重复解析
Aug 9, 2026
03d933e
Test: 增加四种调度模式的宽参数协议边界
Aug 10, 2026
79c7055
Update: Scalar DAG 改用分引擎 Execute ticket
Aug 10, 2026
77bd5e3
Test: 补齐四种通用调度后端的协议上限边界
Aug 10, 2026
3273d3a
Test: 扩展四种调度模式的非 PA 边界矩阵
Aug 10, 2026
ec26e2c
Perf: 建立SIMT DAG Builder低扰动分段观测
Aug 10, 2026
3889b35
Perf: 复用SIMT同生产者输出发布确认
Aug 10, 2026
e32e86e
Perf: 用创建者边界收紧SIMT DAG历史查询
Aug 10, 2026
7c0eaa6
Perf: 合并SIMT DAG重复描述符遍历
Aug 10, 2026
ec272dd
Profile: 补齐五种调度模式的真实泳道闭合
Aug 10, 2026
54c1a4b
Update: 修正 cross-core 无预制计划设计合同
Aug 10, 2026
8a9c339
Update: 用全员真实回放替换 cross-core 预制调度
Aug 10, 2026
05abf80
Fix: 闭合真实回放的动态输入一致性
Aug 10, 2026
17016d7
Refactor: 删除 cross-core 预制调度死路径
Aug 10, 2026
c3858ca
Refactor: 收口 cross-core S7 无预制计划状态
Aug 10, 2026
178457c
Docs: 量化 Claim loser Atomic 并收敛提前执行结论
Aug 10, 2026
d875beb
Docs: 梳理 cross-core 唯一 TaskPlan 的架构困境
Aug 10, 2026
cbcd827
功能:拆分 cross_core ordinary 预制与动态 TaskPlan
Aug 11, 2026
69a70a8
新增 AICPU TaskPlan 的 ordinary Scalar 基础协议
Aug 10, 2026
efdd3ee
验证真实 AICPU Plan 生成与 Scalar 中央领取协议
Aug 10, 2026
5b725df
实现 AICPU Plan 驱动的 ordinary Scalar Build 全链路
Aug 10, 2026
8374668
验证 AICPU Plan 的 ordinary SIMT 四 leader 基础协议
Aug 10, 2026
775f2b0
验证 SIMT ordinary writer 并参数化 Build population
Aug 10, 2026
8d4f643
验证 AICPU Plan 的 ordinary SIMT 窄完整 Build
Aug 11, 2026
c8a23fc
验证 ordinary SIMT 的真实状态映射与双 TU 入口
Aug 11, 2026
e823773
实现 AICPU Plan 驱动的 ordinary SIMT Build 全链路
Aug 11, 2026
1b22009
完善 AICPU Plan 双策略与联合泳道
Aug 11, 2026
46a3ea5
完善 AICPU TaskPlan 泳道明细并收缩 PlanAhead 发布开销
Aug 11, 2026
7a62e41
Add: 验证 AICPU 与 AICore 双向缓存交互
Aug 12, 2026
61d97ad
Perf: 删除 AICPU Plan task 发布冗余缓存维护
Aug 12, 2026
6a0378b
Perf: 精简 AICPU Plan 发布热路与原子控制
Aug 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
136 changes: 136 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Copyright (c) PyPTO Contributors.
# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
# CANN Open Software License Agreement Version 2.0 (the "License").
# Please refer to the License for details. You may not use this file except in compliance with the License.
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
# See LICENSE in the root of the software repository for the full text of the License.
# -----------------------------------------------------------------------------------------------------------

BasedOnStyle: LLVM
Language: Cpp

# --- Indentation ---
IndentWidth: 4
TabWidth: 4
UseTab: Never
ContinuationIndentWidth: 4
IndentCaseLabels: false
IndentPPDirectives: None
NamespaceIndentation: None

# --- Column limit ---
ColumnLimit: 120

# --- Pointer & reference ---
DerivePointerAlignment: false
PointerAlignment: Right
ReferenceAlignment: Right

# --- Braces ---
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false

# --- Parameter packing & alignment ---
AlignAfterOpenBracket: BlockIndent
BinPackParameters: true
BinPackArguments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowAllArgumentsOnNextLine: true

# --- Short statements ---
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false

# --- Alignment ---
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignTrailingComments: true
AlignEscapedNewlines: Left
AlignOperands: Align

# --- Constructor initializers ---
BreakConstructorInitializers: AfterColon
PackConstructorInitializers: Never

# --- Inheritance ---
BreakInheritanceList: AfterComma

# --- Template ---
AlwaysBreakTemplateDeclarations: Yes

# --- Binary & ternary operators ---
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false

# --- Includes ---
SortIncludes: Never
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<.*>'
Priority: 3
- Regex: '^".*"'
Priority: 1

# --- Namespace ---
FixNamespaceComments: true
CompactNamespaces: false

# --- Spaces ---
SpaceBeforeParens: ControlStatements
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false

# --- Empty lines ---
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock

# --- Access modifier ---
AccessModifierOffset: -4

# --- Other ---
Cpp11BracedListStyle: true
BreakStringLiterals: true
ReflowComments: true
SortUsingDeclarations: true
InsertBraces: false
AlwaysBreakAfterReturnType: None
46 changes: 46 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright (c) PyPTO Contributors.
# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
# CANN Open Software License Agreement Version 2.0 (the "License").
# Please refer to the License for details. You may not use this file except in compliance with the License.
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
# See LICENSE in the root of the software repository for the full text of the License.
# -----------------------------------------------------------------------------------------------------------

Checks: >
-*,
bugprone-*,
performance-*,
modernize-*,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-modernize-use-nodiscard,
-modernize-macro-to-enum,
-modernize-deprecated-headers,
-modernize-use-auto,
-modernize-use-nullptr,
-modernize-use-using,
-modernize-loop-convert,
-modernize-use-default-member-init,
-modernize-use-equals-delete,
-modernize-use-bool-literals,
-modernize-raw-string-literal,
-bugprone-easily-swappable-parameters,
-bugprone-narrowing-conversions,
-bugprone-reserved-identifier,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-multi-level-implicit-pointer-conversion,
-bugprone-branch-clone,
-bugprone-empty-catch,
-bugprone-lambda-function-name,
-bugprone-macro-parentheses,
-bugprone-infinite-loop,
-bugprone-argument-comment,
-performance-no-int-to-ptr,
-performance-enum-size

WarningsAsErrors: '*'

HeaderFilterRegex: '(src|include)/.*'

FormatStyle: file
10 changes: 10 additions & 0 deletions .claude/commands/perf-example-device.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Benchmark the hardware performance of a single example at $ARGUMENTS

Reference `tools/benchmark_rounds.sh` for the full implementation pattern (device log resolution, timing parsing, reporting format). This skill runs the same logic but for a single example only.

1. Locate the test file under `$ARGUMENTS/`: pick the single `test_*.py` that lives directly in that directory. If none exists, tell the user the directory is not a scene test and stop.
2. Check `command -v npu-smi` — if not found, tell the user this requires hardware and stop.
3. **Detect platform**: Run `npu-smi info` and parse the chip name. Map `910B`/`910C` → `a2a3`, `950` → `a5`. If unrecognized, warn and default to `a2a3`.
4. Find the lowest-ID idle device (HBM-Usage = 0) from the `npu-smi info` output. If none, stop.
5. Run the example following the same pattern as `run_bench()` in `tools/benchmark_rounds.sh`:
- Snapshot logs, run `python $ARGUMENTS/test_<name>.py -p <platform> -d <device_id> --rounds 10 --skip-golden`, find the new log, parse timing, report results.
14 changes: 14 additions & 0 deletions .claude/commands/perf-runtime-device.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Benchmark the hardware performance of all scene tests under `tests/st/<arch>/<runtime>/`

If `$ARGUMENTS` is provided, use it as the runtime name. Otherwise, default to `tensormap_and_ringbuffer`.

Reference `tools/benchmark_rounds.sh` for the full implementation pattern (device log resolution, timing parsing, reporting format).

1. Validate the runtime is one of: `host_build_graph`, `tensormap_and_ringbuffer`. If not, list valid runtimes and stop.
2. Check `command -v npu-smi` — if not found, tell the user this requires hardware and stop.
3. **Detect platform**: Run `npu-smi info` and parse the chip name. Map `910B`/`910C` → `a2a3`, `950` → `a5`. If unrecognized, warn and default to `a2a3`.
4. Find the lowest-ID idle device (HBM-Usage = 0) from the `npu-smi info` output. If none, stop.
5. Enumerate all subdirectories under `tests/st/<arch>/$ARGUMENTS/` that contain a `test_*.py` directly beneath them.
6. For each example, run the same `run_bench()` pattern from `tools/benchmark_rounds.sh`:
- Snapshot logs, run `python <example>/test_<name>.py -p <platform> -d <device_id> --rounds 10 --skip-golden`, find the new log, parse timing, report results.
7. Print a final summary table with example name, average latency, trimmed average, and pass/fail.
7 changes: 7 additions & 0 deletions .claude/commands/profile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Run the example at $ARGUMENTS with profiling enabled on hardware

1. Locate the test file under `$ARGUMENTS/`: pick the single `test_*.py` that lives directly in that directory. If none exists, tell the user the directory is not a scene test and stop.
2. Pick an idle device (HBM-Usage = 0) from `npu-smi info`. If none, stop.
3. Run: `python $ARGUMENTS/test_<name>.py -p a2a3 -d <device_id> --enable-profiling`
4. If the test passes, report the swimlane output file location in `outputs/`.
5. Summarize the task statistics from the console output (per-function timing breakdown).
19 changes: 19 additions & 0 deletions .claude/commands/test-all-device.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Run the full hardware CI pipeline with automatic device detection

1. Check `command -v npu-smi` — if not found, tell the user to use `/test-all-sim` instead and stop
2. **Detect platform**: Run `npu-smi info` and parse the chip name. Map `910B`/`910C` → `a2a3`, `950` → `a5`. If unrecognized, warn and default to `a2a3`
3. Read `.github/workflows/ci.yml` to extract the current `--pto-isa-commit` and `--pto-session-timeout` values from the `st-onboard-<platform>` job's `pytest` invocation
4. From the `npu-smi info` output, find devices whose **HBM-Usage is 0** (idle)
5. From the idle devices, take **at most 4**. If no idle device is found, report the situation and stop
6. Build the device range flag: from the idle devices, find the **longest consecutive sub-range** (at most 4). Pass as `--device <start>-<end>`. If no consecutive pair exists, use the lowest-ID idle device as `--device <id>`
7. Run:

```bash
pytest examples tests/st --platform <platform> --device <range-or-id> \
--pto-session-timeout <timeout> --clone-protocol https \
--pto-isa-commit <commit> -v
```

Parallelism is auto-driven by `--device`: on hardware, one in-flight subprocess per device (`--max-parallel auto` = `len(--device)`); see `docs/testing.md` for the full reuse hierarchy.
8. Report the results summary (pass/fail counts per task)
9. If any tests fail, show the relevant error output and which device failed
15 changes: 15 additions & 0 deletions .claude/commands/test-all-sim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Run the full simulation CI pipeline

1. Read `.github/workflows/ci.yml` to extract the current `--pto-isa-commit` and `--pto-session-timeout` values from the `st-sim-*` jobs' `pytest` invocations
2. **Detect platform**: If `npu-smi` is available, parse the chip name from `npu-smi info`. Map `910B`/`910C` → `a2a3sim`, `950` → `a5sim`. If `npu-smi` is not found, default to `a2a3sim`
3. Build the command:

```bash
pytest examples tests/st --platform <platform> \
--pto-session-timeout <timeout> --clone-protocol https \
--pto-isa-commit <commit> -v
```

4. Run the command (xdist parallelism is auto-enabled via `--max-parallel`, see `docs/testing.md`)
5. Report the results summary (pass/fail counts)
6. If any tests fail, show the relevant error output
15 changes: 15 additions & 0 deletions .claude/commands/test-example-device.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Run the hardware device test for the example at $ARGUMENTS

1. Locate the test file under `$ARGUMENTS/`: pick the single `test_*.py` that lives directly in that directory (not in a subdirectory). If none exists, tell the user the directory is not a scene test and stop.
2. Check `command -v npu-smi` — if not found, tell the user to use `/test-example-sim` instead and stop.
3. **Detect platform**: Run `npu-smi info` and parse the chip name. Map `910B`/`910C` → `a2a3`, `950` → `a5`. If unrecognized, warn and default to `a2a3`.
4. Read `.github/workflows/ci.yml` to extract the current `--pto-isa-commit` value from the `st-onboard-<platform>` job's `pytest` invocation.
5. Pick an idle device: from `npu-smi info`, find one whose HBM-Usage is 0. If none is free, report and stop.
6. Run standalone:

```bash
python $ARGUMENTS/test_<name>.py -p <platform> -d <device_id> \
--clone-protocol https --pto-isa-commit <commit>
```

7. Report pass/fail status with any error output.
13 changes: 13 additions & 0 deletions .claude/commands/test-example-sim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Run the simulation test for the example at $ARGUMENTS

1. Locate the test file under `$ARGUMENTS/`: pick the single `test_*.py` that lives directly in that directory (not in a subdirectory). If none exists, tell the user the directory is not a scene test and stop.
2. Read `.github/workflows/ci.yml` to extract the current `--pto-isa-commit` value from the `st-sim-*` jobs' `pytest` invocations.
3. **Detect platform**: Infer the architecture from the path (e.g., `examples/a2a3/...` or `tests/st/a2a3/...` → `a2a3sim`; `examples/a5/...` or `tests/st/a5/...` → `a5sim`). If the path doesn't contain an arch prefix, default to `a2a3sim`.
4. Run standalone:

```bash
python $ARGUMENTS/test_<name>.py -p <platform> \
--clone-protocol https --pto-isa-commit <commit>
```

5. Report pass/fail status with any error output.
21 changes: 21 additions & 0 deletions .claude/commands/test-runtime-device.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Run hardware device tests for a single runtime specified by $ARGUMENTS

1. Validate that `$ARGUMENTS` is one of: `host_build_graph`, `tensormap_and_ringbuffer`. If not, list the valid runtimes and stop.
2. Check `command -v npu-smi` — if not found, tell the user to use `/test-runtime-sim` instead and stop.
3. **Detect platform**: Run `npu-smi info` and parse the chip name. Map `910B`/`910C` → `a2a3`, `950` → `a5`. If unrecognized, warn and default to `a2a3`.
4. Read `.github/workflows/ci.yml` to extract the current `--pto-isa-commit` and `--pto-session-timeout` values from the `st-onboard-<platform>` job's `pytest` invocation.
5. From the `npu-smi info` output, find devices whose **HBM-Usage is 0** (idle).
6. From the idle devices, take **at most 4**. If no idle device is found, report the situation and stop.
7. Build the device range flag: from the idle devices, find the **longest consecutive sub-range** (at most 4). Pass as `--device <start>-<end>`. If no consecutive pair exists, use the lowest-ID idle device as `--device <id>`.
8. Run:

```bash
pytest examples tests/st --platform <platform> --runtime $ARGUMENTS \
--device <range-or-id> \
--pto-session-timeout <timeout> --clone-protocol https \
--pto-isa-commit <commit> -v
```

Hardware parallelism is auto-driven by `--device` (one subprocess per device); no extra flag needed.
9. Report the results summary (pass/fail counts per task).
10. If any tests fail, show the relevant error output and which device failed.
16 changes: 16 additions & 0 deletions .claude/commands/test-runtime-sim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Run simulation tests for a single runtime specified by $ARGUMENTS

1. Validate that `$ARGUMENTS` is one of: `host_build_graph`, `tensormap_and_ringbuffer`. If not, list the valid runtimes and stop.
2. Read `.github/workflows/ci.yml` to extract the current `--pto-isa-commit` and `--pto-session-timeout` values from the `st-sim-*` jobs' `pytest` invocations.
3. **Detect platform**: If `npu-smi` is available, parse the chip name from `npu-smi info`. Map `910B`/`910C` → `a2a3sim`, `950` → `a5sim`. If `npu-smi` is not found, default to `a2a3sim`.
4. Run:

```bash
pytest examples tests/st --platform <platform> --runtime $ARGUMENTS \
--pto-session-timeout <timeout> --clone-protocol https \
--pto-isa-commit <commit> -v
```

xdist parallelism is auto-selected via `--max-parallel auto` (min of nproc and device pool size on sim); see `docs/testing.md`.
5. Report the results summary (pass/fail counts).
6. If any tests fail, show the relevant error output.
35 changes: 35 additions & 0 deletions .claude/lib/github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# GitHub Shared Procedures

Reusable procedures for GitHub PR workflows.

## Available Procedures

| Procedure | Description | Used By |
| --------- | ----------- | ------- |
| [setup](setup.md) | Authenticate and detect repository context | All |
| [lookup-pr](lookup-pr.md) | Find PR by number, branch, or list all | All |
| [detect-permission](detect-permission.md) | Check push access to PR | fix-pr |
| [commit-and-push](commit-and-push.md) | Squash commits, rebase, and push | github-pr, fix-pr |
| [fetch-comments](fetch-comments.md) | Get unresolved PR review comments | fix-pr |
| [reply-and-resolve](reply-and-resolve.md) | Reply to and resolve review threads | fix-pr |
| [branch-naming](branch-naming.md) | Generate branch name from commit | github-pr |
| [common-issues](common-issues.md) | Troubleshooting reference | All |

## Standard Variables

After running `detect-context`, these variables are available:

| Variable | Description | Example (owner) | Example (fork) |
| -------- | ----------- | --------------- | -------------- |
| `REPO_OWNER` | Origin repo owner | `hw-native-sys` | `contributor` |
| `REPO_NAME` | Origin repo name | `simpler` | `simpler` |
| `PR_REPO_OWNER` | PR target owner | `hw-native-sys` | `hw-native-sys` |
| `PR_REPO_NAME` | PR target name | `simpler` | `simpler` |
| `DEFAULT_BRANCH` | Base branch name | `main` | `main` |
| `BASE_REF` | Full base ref | `origin/main` | `upstream/main` |
| `PUSH_REMOTE` | Where to push | `origin` | `origin` |
| `PR_HEAD_PREFIX` | PR head prefix | *(empty)* | `contributor:` |
| `ROLE` | Repository role | `owner` | `fork` |
| `BRANCH_NAME` | Current branch | `feat/new` | `feat/new` |
| `COMMITS_AHEAD` | Commits ahead of base | `1` | `1` |
| `UNCOMMITTED` | Uncommitted changes | *(empty or files)* | *(empty or files)* |
29 changes: 29 additions & 0 deletions .claude/lib/github/branch-naming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Branch Naming

Generate branch name from commit message.

## Rules

1. Determine the commit type prefix:

| Commit type | Branch prefix |
| ----------- | ------------- |
| Add | `feat/` |
| Fix | `fix/` |
| Update | `feat/` |
| Refactor | `refactor/` |
| Support | `support/` |
| Sim | `sim/` |
| CI | `support/` |

2. Take the commit subject description (after `Type: `), lowercase it, replace spaces and special characters with hyphens, strip trailing hyphens.

3. Truncate to 50 characters.

## Examples

**Short commit (no truncation):**
`Refactor: inline ring buffer hot paths` → `refactor/inline-ring-buffer-hot-paths` (37 chars)

**Long commit (with truncation):**
`Support: add complete-phase poll hit-rate logging with detailed statistics` → `support/add-complete-phase-poll-hit-rate-logging-w` (50 chars)
Loading