PTOAS 降级至 LLVM 19 与 VPTO 分支适配 - #1156
Draft
mouliangyu wants to merge 1 commit into
Draft
Conversation
mouliangyu
force-pushed
the
codex/downgrade-llvm19
branch
10 times, most recently
from
August 9, 2026 15:24
9e7f691 to
3e48282
Compare
mouliangyu
marked this pull request as ready for review
August 9, 2026 15:33
mouliangyu
marked this pull request as draft
August 9, 2026 15:33
mouliangyu
force-pushed
the
codex/downgrade-llvm19
branch
18 times, most recently
from
August 12, 2026 06:57
e071911 to
052a546
Compare
mouliangyu
force-pushed
the
codex/downgrade-llvm19
branch
2 times, most recently
from
August 12, 2026 08:26
a8ce2c4 to
96cd7c2
Compare
mouliangyu
force-pushed
the
codex/downgrade-llvm19
branch
from
August 12, 2026 08:28
96cd7c2 to
9b99b11
Compare
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.
概要
将 PTOAS 的唯一 LLVM/MLIR 依赖基线从 21.1.8 降级到 19.1.7,并切换到
vpto-dev/llvm-project:feature-vpto(验证提交fa2fd1f75d742fec91ecf40d98c9c7961647ec42)。这不是单纯修改依赖引用:PR 同步完成当前 PTOAS 源码对 LLVM 19 MLIR API、VMI one-to-N 转换、EmitC、Python bindings 和 VPTO LLVM emitter 的适配,并更新构建、CI、Docker、测试及开发文档。迁移后的源码只支持 LLVM 19,不维护 LLVM 19/21 双版本条件分支。
主要变更
feature-vpto。AddMLIRPython接口,同时保留ptoas.mlir命名空间和统一libPTOASCompiler.soruntime 边界。VMIToVPTO移植到 LLVM 19 独立的OneToNTypeConversion框架,覆盖函数签名、控制流、vreg/mask 展开、load/store、group-slot、iota、量化、归约和 tail lowering。vpto-combine-reductions在 mask simplify、LICM 和 CSE 后统一恢复 LLVM 21 的vc*/vcg*add、max、min 合并效果,并保留动态或不等价 mask 的保守路径。no_inline语义。FormExpressions在合法 EmitC 上崩溃;相应测试验证展开后的临时值、地址计算和数据流。CHECK-DAG。docs/designs/ptoas-llvm19-downgrade.md。验证
PTOASCompiler、PTOASPythonPackage、pto-test-opt、ptobc、pto-vfsimt-size-patcher-test构建通过。ptobcencode/decode roundtrip 后由 PTOAS 重新解析通过。.codex/skills/build-ptoas-wslquick validation 通过。git diff --check通过。--cann-output-version=9.0.0 --pto-arch=a5 --pto-backend=vpto --emit-vpto-llvm-ir导出aicore_ld_st_dev文本 LLVM IR,并由 CANN 9.0 Bisheng 成功编译为dav-c310-vecELF relocatable device object。范围说明
本地已完成源码、完整 lit、Python、bytecode 和 device object smoke validation。Linux/macOS wheel 的实际 build/repair/install、static-PIC LLVM SDK profile,以及 simulator/NPU、PTO-Gym 和更广泛 TileLang runtime 验证仍由对应平台门禁执行。