Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5bfd217
feat: first stage of vmi
mouliangyu Jun 17, 2026
25c0449
feat: support num_groups layout
mouliangyu Jun 18, 2026
c22a332
feat: new layout-lowering design
mouliangyu Jun 21, 2026
86be05c
Add VMI layout assignment lowering coverage
mouliangyu Jun 22, 2026
ed0c6d3
Support S32 partial grouped mask lowering
mouliangyu Jun 22, 2026
55cc391
Support dynamic S32 grouped mask lowering
mouliangyu Jun 22, 2026
e4f0e08
Clarify VMI layout case coverage gaps
mouliangyu Jun 22, 2026
68139f6
Record VMI layout coverage audit
mouliangyu Jun 22, 2026
746ed24
Add dynamic S32 group mask runtime coverage
mouliangyu Jun 22, 2026
51b299b
Detail VMI layout assignment request rules
mouliangyu Jun 22, 2026
ca4427c
Complete VMI layout request builder coverage
mouliangyu Jun 22, 2026
ca4aef3
Inline private VMI physical helpers before VPTO emission
mouliangyu Jun 22, 2026
c92c1c7
Validate required VMI selected plans
mouliangyu Jun 22, 2026
e4c6c19
Document VMI layout closure matrix
mouliangyu Jun 22, 2026
a538a19
Add VMI dense reduce multi-consumer case
mouliangyu Jun 22, 2026
2acfe3b
Remove VMI selected plan attrs
mouliangyu Jun 22, 2026
cffd39d
Implement VMI layout optimization pipeline
mouliangyu Jun 22, 2026
45cc07c
Support multi-chunk VMI group reduce slots
mouliangyu Jun 22, 2026
6171266
Implement typed VMI group reduce lowering
mouliangyu Jun 22, 2026
5ec48ee
Implement VMI layout support lowering
mouliangyu Jun 23, 2026
c40cb69
Support partial packed VMI group slots
mouliangyu Jun 23, 2026
8677aad
Add VMI introduction design doc
mouliangyu Jun 23, 2026
c556f5f
Fold deinterleaved VMI loads through vldsx2
mouliangyu Jun 23, 2026
7754a5a
Document VMI layout assignment mechanism
mouliangyu Jun 23, 2026
8831387
Illustrate VMI layout equivalence classes
mouliangyu Jun 23, 2026
44a746c
Add VMI histogram lowering support
mouliangyu Jun 24, 2026
b4c9f3e
Remove VMI load full read attribute
mouliangyu Jun 24, 2026
f910f61
Define VMI scatter as unique-index op
mouliangyu Jun 24, 2026
2b3c42d
Add VMI group max quant kernel case
mouliangyu Jun 24, 2026
4a5edbc
feat: add cce-aligned vmi kernel cases
mouliangyu Jun 24, 2026
ab3da79
fix: adapt vgather2 u16 offset carrier
mouliangyu Jun 28, 2026
184f44d
Rename VMI sparse layout to lane stride
mouliangyu Jun 28, 2026
25c126e
Adjust VMI reduction result shapes
mouliangyu Jun 28, 2026
4d09907
Add VMI simdvf per-block FP8 cast kernel case
mouliangyu Jun 28, 2026
08243e4
Support two-way VMI interleaved memory ops
mouliangyu Jun 29, 2026
4675c36
Add VMI group broadcast E2B lowering
mouliangyu Jun 29, 2026
50b86dc
Rename VMI layout fold pass
mouliangyu Jun 29, 2026
33704e0
Implement VMI relation-aware rematerialization
mouliangyu Jun 29, 2026
12f385b
Optimize equivalent VPTO vcvt normalization
mouliangyu Jun 29, 2026
175c788
Run public LICM in VMI pipeline
mouliangyu Jun 29, 2026
fbcea2b
Support VMI u8 to u16 integer extension
mouliangyu Jun 29, 2026
b180d95
Optimize VMI trunci layout rematerialization
mouliangyu Jun 29, 2026
7269e5a
Generalize VMI dense lane-stride layouts
mouliangyu Jun 30, 2026
9fede90
Support arity-driven VMI cast layouts
mouliangyu Jun 30, 2026
0fed4d2
Clarify PTO-Gym validation skill scope
mouliangyu Jun 30, 2026
6c3c3cc
Fix arity-driven VMI cast layout selection
mouliangyu Jun 30, 2026
0a686b6
test(vmi): use group-slot result shapes in runtime cases
mouliangyu Jun 30, 2026
7f49432
Optimize VMI group broadcast load layout
mouliangyu Jul 1, 2026
b62b87b
Support compact VMI f32 to fp8 truncf layouts
mouliangyu Jul 2, 2026
0b2e063
docs: describe vmi layout propagation model
mouliangyu Jul 1, 2026
0f88e70
fix: migrate VMI conversion to LLVM 21 APIs
mouliangyu Jul 3, 2026
75dd502
Refine VMI layout propagation
mouliangyu Jul 5, 2026
3c49b61
Support BRC group broadcast loads
mouliangyu Jul 7, 2026
8526930
Clean up VMI target capability checks
mouliangyu Jul 7, 2026
607d7f2
Avoid clearing inactive group-reduce lanes
mouliangyu Jul 7, 2026
8eade5c
Prefer lane-stride layouts for narrow VMI stores
mouliangyu Jul 8, 2026
f82f4f2
add primtiives to run rope test
Jul 9, 2026
dac838b
add pto.ml dsl rope example
learning-chip Jul 9, 2026
4e6ac66
add pto.vmi dsl rope example
Jul 13, 2026
4a0b966
Merge pull request #2 from MirkoDeVita98/mi_dsl_rope-vmi-example
learning-chip Jul 13, 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
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .codex/skills/pto-gym-vpto-validation/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
name: pto-gym-vpto-validation
description: Run PTO-Gym validation from this PTOAS repo. Use when the user asks to run PTO-Gym SIM or board validation from the current source tree. Always force PTOAS onto the VPTO LLVM path instead of relying on the repo default backend.
description: Run bundled PTO-Gym exercise/validation cases. Use when the user explicitly asks for PTO-Gym, 3rdparty/PTO-Gym, or the PTO-Gym validation scripts. Always force PTOAS onto the VPTO path instead of relying on the repo default backend.
---

# PTO-Gym VPTO Validation

Use this skill when the task is specifically about:
- running `3rdparty/PTO-Gym/examples/pto/scripts/run_host_vpto_validation.sh`
- running `3rdparty/PTO-Gym/examples/pto/scripts/run_host_vpto_validation_parallel.sh`
- validating PTO-Gym cases from this PTOAS source tree
- validating bundled PTO-Gym exercise cases

## Required Rule

When PTO-Gym is run from this repo, do not rely on the default PTOAS backend.

Always pass PTOAS flags that force the VPTO LLVM path.
The current `ptoas` CLI spellings in this repo are `--pto-backend=vpto` and
`--vpto-emit-hivm-llvm`; do not shorten `--pto-backend` to `--backend`.
The current `ptoas` CLI spelling in this repo is `--pto-backend=vpto`; do not
shorten `--pto-backend` to `--backend`.

Use:

```bash
PTOAS_FLAGS='--pto-backend=vpto --vpto-emit-hivm-llvm --pto-arch a5'
PTOAS_FLAGS='--pto-backend=vpto --pto-arch a5'
```

If the caller already provides `PTOAS_FLAGS`, make sure these options are still
Expand All @@ -44,7 +44,7 @@ Typical simulator environment:
source /home/mouliangyu/.local/ascend/beta.2/cann-9.0.0-beta.2/set_env.sh
export ASCEND_HOME_PATH=/home/mouliangyu/.local/ascend/beta.2/cann-9.0.0-beta.2
export PTOAS_BIN=$PWD/build/tools/ptoas/ptoas
export PTOAS_FLAGS='--pto-backend=vpto --vpto-emit-hivm-llvm --pto-arch a5'
export PTOAS_FLAGS='--pto-backend=vpto --pto-arch a5'
```

## Canonical Commands
Expand Down
6 changes: 6 additions & 0 deletions .codex/skills/ptoas-project-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ description: Project development guidance for PTOAS. Use when Codex modifies PTO

When changing any user-visible behavior, update every relevant layer in the same change. Treat ODS, verifiers, lowering, command-line behavior, bindings, docs, examples, and tests as one public contract.

## File Orientation Before Editing

Before editing any existing file, read the file's header or top-level comments first. Check whether they describe the file's purpose, structure, section boundaries, or editing constraints, and follow those constraints when making changes.

When a change creates or depends on a file-level structure rule, ownership boundary, or important functional description, add or update that guidance in the file's top-level comments so future edits see it before jumping into local code.

## Layers To Keep In Sync

1. ODS and dialect definitions: `include/PTO/IR/*.td`
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ ptoas test/lit/pto/empty_func.pto --pto-arch=a5 -o outputfile.cpp
# 指定构建 Level(level3 会禁用 PlanMemory/InsertSync)
ptoas test/lit/pto/empty_func.pto --pto-level=level3 -o outputfile.cpp

# 启用实验性 VMI -> VPTO 语义 pipeline
# 该模式要求 --pto-backend=vpto,或输入 IR 中带 pto.backend = "vpto"
# public function signature 不能直接暴露 !pto.vmi.* 类型
ptoas test/lit/vmi/vmi_ptoas_cli_pipeline.pto --pto-arch=a5 --pto-backend=vpto --enable-vmi --emit-vpto -o -

# 查看当前 ptoas release 版本号
ptoas --version

Expand Down
Loading