Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
258 commits
Select commit Hold shift + click to select a range
4d5dac8
fix: show get_buf/rls_buf inside scf loop for 1:N example
Apr 11, 2026
dcd8586
refactor vpto llvm emiter
Apr 11, 2026
227da17
add online softmax (q * k is ready) case
Apr 12, 2026
dbfe96b
docs: add VPTO spec v0.3 release draft
WenboCodes Apr 12, 2026
a77c8b2
add PTO-Gym submodule
Apr 12, 2026
949a928
feat: add PTO-Gym guide skill
Apr 12, 2026
495a02c
Add tilelang dsl implementation
Zhendong404 Apr 3, 2026
f5ee676
Update openspec
Zhendong404 Apr 3, 2026
47a102f
Support more syntax in tilelang dsl
Zhendong404 Apr 3, 2026
5ac3dba
Update openspec
Zhendong404 Apr 3, 2026
0fdf4d3
tilelang dsl first working version
Zhendong404 Apr 4, 2026
0d8e71e
Update openspec
Zhendong404 Apr 4, 2026
5d96301
Support more dsl syntax
Zhendong404 Apr 7, 2026
0945be0
Amend
Zhendong404 Apr 7, 2026
bd86d21
Update docs
Zhendong404 Apr 7, 2026
11bc085
docs: add TileOp expand design and demo
Apr 7, 2026
b424d21
feat(transforms): add Tile→Vector template lowering pipeline
Apr 7, 2026
f640129
brough back the lost pass and pto op after rebase
Apr 12, 2026
40b2c93
feat: tile lang dsl
Zhendong404 Apr 7, 2026
203ea91
Update DSL user guide
Zhendong404 Apr 11, 2026
51112bb
Support more tile attributes
Zhendong404 Apr 11, 2026
30dd61a
Support more event IDs
Zhendong404 Apr 11, 2026
2e63819
Align copy_ubuf_to_ubuf
Zhendong404 Apr 11, 2026
f0aeccb
Support more load/store ops
Zhendong404 Apr 11, 2026
17f2268
Support colmajor indexing syntax
Zhendong404 Apr 11, 2026
59368d7
Enhance Tile indexing syntax documentation to clarify restrictions on…
Zhendong404 Apr 11, 2026
cad7e7f
Update openspec
Zhendong404 Apr 11, 2026
5d7ec5a
Support more predicate ops
Zhendong404 Apr 11, 2026
70026b1
Support keyword arguments for vdup and vci operations in TileLang DSL
Zhendong404 Apr 11, 2026
64b295b
Support more dma operations
Zhendong404 Apr 13, 2026
c3111af
Align DSL interface with VPTO v0.3
Zhendong404 Apr 13, 2026
0523127
Add more memory op support
Zhendong404 Apr 13, 2026
5364861
Fix failed lit case
Zhendong404 Apr 13, 2026
e464210
Dump source location for DSL frontend errors
Zhendong404 Apr 13, 2026
0d1961b
Fix inline_proc codegen
Zhendong404 Apr 13, 2026
5e14184
Support optional RoundMode/SatMode/Part arguments in vcvt op
Zhendong404 Apr 13, 2026
48192c2
Fix tile attribute extraction
Zhendong404 Apr 14, 2026
4157241
support expand tload/tstore to tile lib in ptoas
Apr 10, 2026
fc1da2f
Fix TileLang ST ptoas invocation
Apr 11, 2026
fa4a4b5
Fold TileLang dead branches after intrinsic folding
Apr 11, 2026
22fc03b
Fix tilelang ST tadd simulator flow
Apr 11, 2026
6b40947
fixup ptr normalize
Apr 13, 2026
1eefa5b
Refactor tilelang ST framework and document full execution flow
Apr 13, 2026
4dc3c6d
Add local tilelang ST test common header
Apr 13, 2026
a57b62a
resolve confilct
Apr 14, 2026
1f9afec
update ptoas option
Apr 14, 2026
edf07f4
Support scalar mod operation in DSL
Zhendong404 Apr 14, 2026
1c9b329
Support custom tile padding value
Zhendong404 Apr 14, 2026
9c06560
Fix missing valid_shape/padvalue info when expand tileop
Zhendong404 Apr 14, 2026
ef243ec
Use pad_value.eval() instead of pad_value.value
Zhendong404 Apr 14, 2026
7986fc4
Fix semantics of vdup op
Zhendong404 Apr 14, 2026
9baecde
Fix vecscope inference for inline_proc
Zhendong404 Apr 14, 2026
a0afcd3
Fix tshrs/tshls scalar type legality check
Zhendong404 Apr 14, 2026
6b82096
fix(dsl): extend scalar arithmetic/bitwise lowering and tests (#71)
Zhendong404 Apr 14, 2026
91a7926
fix(dsl): align vbitsort and vmrgsort4 with vpto (#67)
Zhendong404 Apr 14, 2026
caa47c3
[PTOAS] wire MLIR IR printing through ptoas pipelines
Zhendong404 Apr 14, 2026
dde7293
Use select_kernel for expand helper selection
Apr 14, 2026
b3091a9
Recover static view strides in ExpandTileOp
Apr 14, 2026
34d0378
Refine tilelang ST compare flow
Apr 14, 2026
d1c6fdd
fix(tilelang-dsl): enforce vcvt attrs by type pair and align vcvt low…
Zhendong404 Apr 15, 2026
69b154e
chore: drop trowargmax template from issue #63 PR
Zhendong404 Apr 15, 2026
1a4d808
fix(dsl): support module-level literal constants in kernels (#62)
Zhendong404 Apr 15, 2026
b9782ed
feat(dsl): allow inline_proc capture of module literal globals
Zhendong404 Apr 15, 2026
9c9ba5c
Update dsl user guide
Zhendong404 Apr 15, 2026
639498b
tilelang-dsl: support pass as frontend no-op
Zhendong404 Apr 15, 2026
708d79a
align(tilelang-dsl): support PartitionTensorView slice binding and docs
Zhendong404 Apr 15, 2026
bc501d2
udpate tload and tstore.
sundyCoder Apr 14, 2026
5fcbdd6
update tload, tstore and related ST.
sundyCoder Apr 15, 2026
e623e63
Add a skill to resolve DSL issue
Zhendong404 Apr 14, 2026
b962d93
fix(tilelang-dsl): emit stable float bit-pattern constants
Zhendong404 Apr 15, 2026
f98ed53
fix(tilelang-dsl): enforce explicit pointer surface for psts
Zhendong404 Apr 15, 2026
0798ead
fix(dsl): handle valid_shape subscript and guard unsupported tuple su…
Zhendong404 Apr 16, 2026
56ab058
support pto.set_mov_pad_val
Apr 15, 2026
aee050d
Add VPTO membar support
Apr 14, 2026
54cb093
warning the channel vsts
Apr 15, 2026
09ea911
update docs for channel vsts
Apr 15, 2026
905154f
fix(dsl): support explicit set_mov_pad_val for DMA padding
Zhendong404 Apr 16, 2026
e9932bb
fix: support unsigned dtypes in ExpandTileOp
Apr 15, 2026
3762b68
fix(tilelang-dsl): keep vbitsort and vmrgsort4 out of inferred vecscope
Apr 16, 2026
10dad24
feat(tilelang-dsl): add select_kernel diagnostics report
Zhendong404 Apr 16, 2026
e927a6d
specify dist of vsts/vlds
Apr 16, 2026
c652492
fix(dsl): materialize vtrc round mode in tilelang
Zhendong404 Apr 16, 2026
4a9c7f4
Add tcvt TileLib support and ST coverage
Apr 16, 2026
39e00c8
Add f16-to-f32 tcvt support
Apr 16, 2026
731865a
Add f32-to-f16 tcvt support
Apr 16, 2026
36dd795
let the dist of store op more flexiable
Apr 17, 2026
25dd553
fix(dsl): fix vecscope inference
Zhendong404 Apr 17, 2026
849e57b
support ctrl reg configure ops
Apr 19, 2026
51bcc3f
udpate tload and tstore, and add testcase.
Apr 20, 2026
d7b4524
feat(dsl): complete predicate ops and enforce PredicateDist enum
Zhendong404 Apr 17, 2026
a76956e
Add vbitcast implementation
Zhendong404 Apr 17, 2026
0e03404
Fix TileLang enum support for issue 131
Zhendong404 Apr 20, 2026
4d07cb3
Adding testing for TCI, assuring correctness
OmarZohir Apr 17, 2026
fbe08ce
test(tilelang_st): add self-hosted runner batch entrypoint
Zhendong404 Apr 20, 2026
236c8c7
fix(tilelang-dsl): emit signless arith constants for unsigned scalars…
Zhendong404 Apr 20, 2026
658e71e
Revert "Adding testing for TCI, assuring correctness"
Zhendong404 Apr 20, 2026
36e4d55
fix(tilelang-dsl): support i64 vregs in DSL v1 (#151)
Zhendong404 Apr 21, 2026
5090f58
bugfix: i8/i16 vcadd will widen the return type
Apr 20, 2026
67a7dc4
bugfix: i8/i16 vcadd res type
Apr 21, 2026
696fd6c
bugfix: update i8/i16 vcadd dsl docs
Apr 21, 2026
2d4647c
fix(tilelang-dsl): align f16->i32 vcvt contract (#152)
Zhendong404 Apr 21, 2026
d189016
Support bf16->f16 convert
Zhendong404 Apr 21, 2026
8caf583
Support materialize PadValue with eval(dtype) interface
Zhendong404 Apr 21, 2026
a500dc9
fix(dsl): allow PadValue.eval with static dtype bindings
Zhendong404 Apr 21, 2026
28fa87e
fix(tilelang-dsl): auto-cast mov pad scalars for issue 170 (#170)
Zhendong404 Apr 21, 2026
34af40a
fixup ci
Apr 21, 2026
3112fd8
fix(dsl): support integer string scalar literals (#174)
Zhendong404 Apr 21, 2026
d482a9a
feat: vpto ci
Apr 21, 2026
ed2b927
feat: ignore local workspace
Apr 22, 2026
6b1321e
feat: support tilelang dsl ci
Apr 22, 2026
0fa8bb7
remove the fork repo pr protects
Apr 22, 2026
f9c89fc
fix(vpto): normalize signed integer vector decls
Zhendong404 Apr 22, 2026
3b3959d
[WIP] feat: new dma load/store op (#141)
mouliangyu Apr 22, 2026
b9c00a7
Support packed vcvt part modes
Zhendong404 Apr 22, 2026
bda4063
Support p0/p1/p2/p3 vcvt part mode
Zhendong404 Apr 22, 2026
8fa8abf
Support the whole mem barrier types
Zhendong404 Apr 22, 2026
32eaa4d
chore(ci): fix license headers for pr199
Zhendong404 Apr 22, 2026
2938752
fix(expand-tileop): add cmp_mode attribute handling for TCmpOp and TC…
Zhendong404 Apr 22, 2026
fed07fa
feat: support dsl ut ci
Apr 22, 2026
cfee28c
feat(tilelang-dsl): add vscatter surface lowering
Zhendong404 Apr 22, 2026
72798b8
fix(dsl): require hex strings for integer bit patterns (#174)
Zhendong404 Apr 22, 2026
fb201c6
docs: add license headers to issue 174 updates
Zhendong404 Apr 22, 2026
1eac185
Add bitcast after arith.constant
Zhendong404 Apr 21, 2026
6a3c1c2
fix: handle type compatibility in tryCloneOpLibInlineBridgeOp
Zhendong404 Apr 21, 2026
4d4e23d
fix(dsl): align vexpdif surface with VPTO
Zhendong404 Apr 22, 2026
4b741bb
fix: avoid false A5 tprelu vec overflow in memory planning
FangRui0 Apr 22, 2026
f2ecaca
fix(dsl): unify type conversion logics in frontend
Zhendong404 Apr 22, 2026
304e186
fix(ptoas): make vpto backend own tile op expansion (#162)
Zhendong404 Apr 21, 2026
d1f5033
feat: support pto.pbitcast op
Apr 23, 2026
398beb5
fix(dsl): fix the order mode lowering of pto.vci
Zhendong404 Apr 23, 2026
bf4dc9a
feat: support copy_ubuf_to_ubuf / dma_copy lowering
Apr 23, 2026
555c921
fix(vpto): align vrelu i32 support (#220)
Zhendong404 Apr 23, 2026
d58d89c
Fix DSL frontend vecscope auto inference
Zhendong404 Apr 23, 2026
b2e071b
feat(tilelang-dsl): support constructor calls on static dtype bindings
Zhendong404 Apr 22, 2026
dd3759b
fix(dsl): fix DSL frontend punpack lowering
Zhendong404 Apr 23, 2026
7ea5b6f
bugfix: vbr/cmps with vreg<i8> accepts i16 as scalar operand
Apr 23, 2026
c1d7dce
feat: vci support si8/si16/si32/f16/f32
Apr 23, 2026
ec226ed
feat: remove dead code
Apr 23, 2026
d6634cd
feat: dsl supports for trems
Apr 23, 2026
b6e09ac
align(tilelang-dsl): require enum dist for vlds/vsts
Zhendong404 Apr 24, 2026
3b22970
chore(tileops): add missing license header for tcvt template
Zhendong404 Apr 24, 2026
8b59232
Add a mixed Tile/VPTO online softmax kernel
Apr 23, 2026
a2fafdd
Refine mixed Tile/VPTO softmax kernels and CI fixes
Apr 24, 2026
bc85fea
fix(pto): avoid false A5 trowarg vec overflow (#558)
Zhendong404 Apr 23, 2026
69e6dcd
Fix tcolarg verifier element width constraints
Zhendong404 Apr 23, 2026
d05c68f
feat(tileop): Add unary tileop templates (#168)
liggest Apr 24, 2026
f7447e3
feat(vpto): add vmatmal op and dependent copy op
FangRui0 Apr 21, 2026
3b03da3
feature dma remove sid (#243)
mouliangyu Apr 24, 2026
8e5b7d8
fix(dsl): forward trandom rounds in tile expansion (#245) (#250)
Zhendong404 Apr 24, 2026
3b60e53
Add OP for TPartAdd & TPartMul (#213)
erhsh Apr 25, 2026
6c45966
Add OP for TPartMin & TPartMax (#230)
erhsh Apr 25, 2026
31a863a
fix(vpto): legalize integer cast ops after VPTO lowering (#240)
Zhendong404 Apr 24, 2026
980e6f5
fix(vpto): restore byte-scalar vdup HIVM ABI
Zhendong404 Apr 25, 2026
677395e
feat: cancel ci on update (#260)
mouliangyu Apr 25, 2026
2d289c8
fix(vpto): normalize scalar memref access before llvm emit (#247)
Zhendong404 Apr 25, 2026
4317477
feat: disable vpto ci
Apr 25, 2026
9c09a83
docs(vpto): add Cluster Programming Model section to Part I
Apr 25, 2026
55f1921
docs(vpto): add ASCII cluster topology diagram to Cluster Programming…
Apr 25, 2026
ca28119
docs(vpto): fix SC semaphore layout in cluster diagram
Apr 25, 2026
f8592d9
[feat] add rowsum rowmin rowmax rowargmax rowargmin (#255)
lwwangcgz Apr 25, 2026
5312763
add tcolmax tcolmin tileops lib implementation (#221)
ChaoyangJi Apr 25, 2026
9c73d05
Add scalar ops (#191)
LLMZhangYC Apr 25, 2026
8466ce4
feat: improve the func call in dsl. and support vdiv/vmod func
Apr 25, 2026
c3797c3
add texpand/tfillpad/tfillpad_inplace/tfillpad_expand op (#167)
kangjiaming1 Apr 25, 2026
b5f9e97
bugfix: vprelu should accept mask operand (#266)
mouliangyu Apr 25, 2026
499e9d7
ST tests for TReLU, TLReLU , TPrelu, Tsel and Tselsand operators have…
yuqiha Apr 25, 2026
4597cd1
add trowexpand op (#149)
pbbb205 Apr 25, 2026
e2f991f
feat: enable vpto sim
Apr 26, 2026
d71462b
fix(dsl): allow integer vdiv vector types
Zhendong404 Apr 25, 2026
0923963
feat: support vmrgsort4 emit
Apr 25, 2026
6135d61
feat: support 64bits dma op
Apr 25, 2026
0d03772
add tcolexpand series op (#169)
bingmeiyou Apr 27, 2026
38cc246
[Add] tadd tsub tmul tdiv tmax tmin tshl tshr tor tand txor tcmp trem…
Apr 27, 2026
454b061
[Add] tcmp trem tfmod
Apr 27, 2026
c515dbe
[Delete] tcmp tfmod trem
Apr 27, 2026
e707c7d
[Delete] tcmp tfmod trem
Apr 27, 2026
9a4df37
[Fix] pass CI
Apr 27, 2026
1a6b535
[Fix] delete tcmp tfmod trem in Cmakelists
Apr 27, 2026
2ed48b0
[Fix] CI error in tmin
Apr 27, 2026
4662a3e
Fix VPTO vcvt and vaxpy mask lowering
Zhendong404 Apr 27, 2026
690e8bc
Fix installed TileLang resources and disable wheel CI
Zhendong404 Apr 25, 2026
9324eab
Fix TileLang soft-math helper lookup in installed layout
Zhendong404 Apr 27, 2026
352427a
bugfix: fixup the mask lack (#291)
mouliangyu Apr 27, 2026
0a87075
[Fix] TPartMin & TPartMax add mem_bar
Apr 28, 2026
721a08b
Fix saturation immediate encoding in VPTO LLVM emitter
Apr 28, 2026
969a6b2
Fix lit cases
Zhendong404 Apr 28, 2026
8b08239
fix(dsl): allow mixed index and integer scalar binary ops (#246)
Zhendong404 Apr 25, 2026
76a92ee
feat(vpto): support vecscope auto infer in the vpto backend
Zhendong404 Apr 27, 2026
7aab96a
Support cross-file inline_proc import
Zhendong404 Apr 27, 2026
8ebbb4c
fix(vpto): support merged align state across scf.if (#300) (#308)
Zhendong404 Apr 29, 2026
ce77b9c
docs: refresh Tile Instruction specs and release bundles
Apr 29, 2026
344059d
docs: move tensor_view_addr into tile spec
Apr 29, 2026
0f5cec9
docs: refresh v0.4 release spec notes
Apr 30, 2026
6670954
fix(vpto): force V300 ctrl mode for sat-sensitive vcvt
Zhendong404 Apr 29, 2026
0626c66
feat: add cube dma laod/store ops
FangRui0 Apr 25, 2026
33905f4
bugfix: fixup mix fatobj
Apr 29, 2026
e8014e9
fix(test/vpto): use pto.acc_store_gm for ACC to GM in cube vpto ST
FangRui0 Apr 30, 2026
f9b523b
feat: add left/right_load_mx
FangRui0 Apr 30, 2026
e5a2b23
docs: add NZ fractal layout section for cube buffers in Cluster Progr…
peanutchan Apr 30, 2026
12be5c4
docs: add Cube Internal Buffer Layout NZ Fractal Format section
peanutchan Apr 30, 2026
b1ebb9f
[Feat] enhance vcvt behavior for rowsum (#295)
lwwangcgz May 6, 2026
68a91a7
[Add] tcmp tfmod trem (#321)
handsomeRobotSK May 6, 2026
821189e
fix tfillpad_inplace_template (#299)
kangjiaming1 May 6, 2026
85dea6e
Add trems/tcmps/tfmods (#283)
LLMZhangYC May 7, 2026
5932870
Delete useless code and abbreviate tile_buf type in test cases (#332)
kangjiaming1 May 7, 2026
5d5fcf2
add tcolargmax/min tileops lib implementation (#294)
ChaoyangJi May 7, 2026
8e7a0d5
Add OP For TSort32 (#258)
erhsh May 7, 2026
7e6ddc6
Fix default render dtype selection for AnyInt
Zhendong404 Apr 29, 2026
5a51620
Support scalar/index auto conversion
Zhendong404 Apr 29, 2026
b3acd8e
Add precision_mode attr plumbing for tile math ops
May 7, 2026
14ccac5
Fix PrecisionMode Python bindings
May 7, 2026
96a27e0
Remove PrecisionMode binding smoke test
May 7, 2026
07e3e2c
add op: tprelu trandom (#328)
yuqiha May 8, 2026
aa32394
feat(tileop): Add more conversion paths for TCVT tileop template (#248)
liggest May 8, 2026
4e45ed8
add tilebuf static check
pbbb205 May 8, 2026
cdfe56c
Merge pull request #641 from Zhendong404/fix-tmrgsort-format2
zhangstevenunity May 8, 2026
d482a2a
cleanup(ptoas): drop duplicate pass registration
Zhendong404 May 8, 2026
fbc34a9
fix(dsl): support builtin vector operand matching (#340)
Zhendong404 May 9, 2026
4ef828c
test: add fixpipe cube-cv mixed st case
FangRui0 May 6, 2026
04ae949
test: add fixpipe cc-to-gm and cc-to-ub st case
FangRui0 May 7, 2026
0cfecb2
test: add fixpipe quant ub cv st case
FangRui0 May 7, 2026
f972ff3
feat: add fp_load wrapper op
FangRui0 May 7, 2026
21b594a
feat: fold fpc into acc_store wrappers
FangRui0 May 7, 2026
608a6cb
feat: sync testcase
May 9, 2026
1e930e3
feat: enable smoke test of tilelang dsl ci
May 10, 2026
9e50d0d
feat(tilelang-dsl): add cube surface and vpto lowering support
Zhendong404 May 6, 2026
41dbae6
Enhance verification for multiple PTO operations in A5 architecture (…
bingmeiyou May 11, 2026
8caee08
Implement ptoas VPTO fatobj emission
May 9, 2026
f43e5f8
Support VPTO section split input
May 9, 2026
26ac78d
test: switch validation suites to fatobj
May 11, 2026
954b8c6
chore: fix PR386 headers for VPTO helpers
May 11, 2026
ec8a724
Remove legacy VPTO target CLI knobs
May 11, 2026
1d16d43
Add get_vms4_sr four-result support
May 12, 2026
d34252d
Add HP (HIGH_PRECISION) support for TLog (#344)
erhsh May 12, 2026
7554acf
Organize PTOAS test frameworks
May 12, 2026
a04ba13
Fix VPTO lit checks for fatobj workflow
May 12, 2026
26a4b0d
Move misplaced VPTO lit cases
May 12, 2026
7f24b72
Fix stale PTO lit cases
May 12, 2026
1eacfbd
quick install script on top of MLIR docker image
learning-chip May 13, 2026
a888321
add reference result for top->vop expansion
learning-chip May 13, 2026
93427ef
low-level python binding example to generate vpto IR
learning-chip May 13, 2026
90c2968
initial prototype of high-level dsl builder api
learning-chip May 13, 2026
f7320e9
initial prototype of softmax IR builder
learning-chip May 13, 2026
e295877
script to check IR equal
learning-chip May 13, 2026
0e62fad
avoid raw MLIR `Type.parse`
learning-chip May 13, 2026
da94960
more Pythonic builder style suggestions
learning-chip May 13, 2026
edb8adf
major refactor of dsl syntax and impl
learning-chip May 13, 2026
e4ea748
[vpto] Add ptodsl tracing POC
Zhendong404 May 14, 2026
be65ea7
[vpto] Allow structured loops without vecscope
Zhendong404 May 14, 2026
06b5e60
Merge pull request #1 from Zhendong404/a5_dsl
learning-chip May 14, 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
  •  
  •  
  •  
141 changes: 141 additions & 0 deletions .codex/skills/generate-vpto-release-doc/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
---
name: generate-vpto-release-doc
description: Generate or refresh bundled PTO ISA reference docs. Packages `docs/vpto-spec.md` together with `docs/isa/micro-isa/*.md` into the main repo doc `docs/PTO-micro-Instruction-SPEC.md`, packages `docs/isa/tile-op/*.md` into the companion repo doc `docs/PTO-tile-Instruction-SPEC.md`, and still supports emitting a legacy versioned snapshot under `docs/release/`.
---

# Generate VPTO Release Doc

Use this skill when the task is specifically about:
- creating or refreshing the main bundled micro-spec `docs/PTO-micro-Instruction-SPEC.md`
- creating or refreshing the standalone Tile Instruction bundle `docs/PTO-tile-Instruction-SPEC.md`
- emitting a legacy versioned snapshot under `docs/release/`
- regenerating downstream bundled docs from PTOAS sources through the same script

The main bundled micro-spec starts from `docs/vpto-spec.md`, strips draft-only metadata and appendix content, then inlines every chapter from `docs/isa/micro-isa/` under a dedicated detailed-reference section. `docs/PTO-tile-Instruction-SPEC.md` stays separate and all cross-doc links are rewritten to point at the bundled filenames.

Do not hand-edit bundled outputs; regenerate them through the script so link rewriting stays reproducible.

## Canonical Workflow

1. Pick the target version. The repo-doc bundle filenames do not carry a version suffix; the version is recorded in the version-history bullets inside each file.

Default output paths:

```bash
docs/PTO-micro-Instruction-SPEC.md # main bundled micro-spec
docs/PTO-tile-Instruction-SPEC.md # standalone Tile Instruction bundle
docs/release/vpto-spec-v<version>.md # optional legacy versioned snapshot
```

2. Run the bundled generator script.

Generate both repo-doc bundles (default):

```bash
python3 .codex/skills/generate-vpto-release-doc/scripts/generate_release_vpto_spec.py --version 0.4
```

Generate just one repo-doc bundle:

```bash
python3 .codex/skills/generate-vpto-release-doc/scripts/generate_release_vpto_spec.py --version 0.4 --target micro
python3 .codex/skills/generate-vpto-release-doc/scripts/generate_release_vpto_spec.py --version 0.4 --target tileop
```

Generate only the legacy versioned snapshot:

```bash
python3 .codex/skills/generate-vpto-release-doc/scripts/generate_release_vpto_spec.py --version 0.4 --target merged
```

Generate downstream docs into another directory while preserving old PTO-Gym filenames:

```bash
python3 .codex/skills/generate-vpto-release-doc/scripts/generate_release_vpto_spec.py \
--version 0.4 \
--output-dir 3rdparty/PTO-Gym/docs \
--micro-output-name PTO-micro-Instruction-SPEC.md \
--tileop-output-name PTO-tile-Instruction-SPEC.md

python3 .codex/skills/generate-vpto-release-doc/scripts/generate_release_vpto_spec.py \
--version 0.4 \
--target merged \
--output-dir 3rdparty/PTO-Gym/docs \
--micro-output-name PTO-micro-Instruction-SPEC.md \
--tileop-output-name PTO-tile-Instruction-SPEC.md \
--merged-output-name vpto-spec.md
```

Custom version-bullet text:

```bash
python3 .codex/skills/generate-vpto-release-doc/scripts/generate_release_vpto_spec.py \
--version 0.4 \
--version-note 'Custom release note for this run'
```

3. Review each generated file.

Invariants for the main bundle (`docs/PTO-micro-Instruction-SPEC.md`):
- exactly one `#` level title at the top
- `[toc]` is present near the top
- the requested-version bullet is at the top of the version-history list
- beginning-of-file draft metadata (`Status`, `Base`, `Updated`) is removed
- appendix content is removed
- `docs/vpto-spec.md` contributes the overview / notation / summary sections
- `## Detailed ISA Group Reference` exists and inlines every chapter from `docs/isa/micro-isa/` in sorted order
- chapter headings are demoted by two levels so each `# N. ...` becomes `### N. ...`
- source-tree links into `isa/micro-isa/...` are rewritten to in-document `#micro-...` anchors
- source-tree links into `isa/tile-op/...` are rewritten to `PTO-tile-Instruction-SPEC.md#tile-...`

Invariants for the Tile Instruction bundle (`docs/PTO-tile-Instruction-SPEC.md`):
- exactly one `#` level title at the top
- `[toc]` is present near the top
- every chapter file from `docs/isa/tile-op/` is inlined in sorted order
- intra-bundle links resolve to `<a id="tile-XX-name"></a>` anchors
- cross-bundle links are rewritten to `PTO-micro-Instruction-SPEC.md#micro-XX-name`

Invariants for the legacy versioned snapshot:
- it carries the same bundled micro-spec content as the main repo doc
- it is emitted under `docs/release/` by default unless `--output-dir` overrides the destination
- Tile Instruction links are rewritten relative to the snapshot location

4. If the user wants extra release-note wording, patch only the version bullets or other small wording around the generated content. Prefer rerunning the script over hand-merging large sections.

## Source Mapping

| Source | Target |
|--------|--------|
| `docs/vpto-spec.md` + `docs/isa/micro-isa/*.md` | `docs/PTO-micro-Instruction-SPEC.md` |
| `docs/isa/tile-op/*.md` | `docs/PTO-tile-Instruction-SPEC.md` |
| `docs/vpto-spec.md` + `docs/isa/micro-isa/*.md` | `docs/release/vpto-spec-v<version>.md` (legacy versioned snapshot) |

## Merge Rules

For the main bundled micro-spec the script:
- emits a single top-level title
- prepends a target-specific version-bullet list
- inserts a `[toc]` marker
- starts from `docs/vpto-spec.md`
- strips draft metadata, appendix content, and now-misleading "see individual files" prose
- preserves the high-level overview and summary sections
- rewrites `isa/micro-isa/*.md` links to in-document anchors
- rewrites `isa/tile-op/*.md` links to the companion bundle filename + anchor
- appends a `## Detailed ISA Group Reference` section that inlines all `docs/isa/micro-isa/*.md` chapters in sorted order

For the standalone Tile Instruction bundle the script:
- emits a single top-level title
- prepends a target-specific version-bullet list
- inserts a `[toc]` marker
- inlines all `docs/isa/tile-op/*.md` files in sorted order
- demotes chapter headings by one level
- emits stable HTML anchors like `<a id="tile-XX-name"></a>`
- rewrites intra-bundle relative links to those anchors
- rewrites cross-bundle relative links to the bundled micro-spec filename + anchor

## Notes

- Repo-doc bundle filenames intentionally drop the version suffix; the version is recorded only in the per-file version-history bullets.
- Default version notes for known versions live inside the script; pass `--version-note` to add or override the note for the requested target.
- When chapter filenames or numbering change in `docs/isa/micro-isa/` or `docs/isa/tile-op/`, regenerate both repo-doc bundles and any legacy snapshots so links stay synchronized.
- If downstream consumers still require older filenames such as `pto-micro-instruction.md`, use `--micro-output-name` / `--tileop-output-name` instead of hand-renaming the generated files.
Loading