Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
475acc1
feat: add PTOAS code compliance skill
HecreReed Jul 29, 2026
526822a
feat: unify tfillpad modes
HecreReed Aug 4, 2026
3d8482a
feat: unify fp operand forms
HecreReed Aug 4, 2026
cdedab5
fix: preserve PTOBC v0 FP operand compatibility
HecreReed Aug 4, 2026
8bf6f45
docs: leave release notes unchanged
HecreReed Aug 4, 2026
e488f9e
fix: use GitHub pto-isa pin for simulator
HecreReed Aug 4, 2026
162ddbc
fix: use pinned pto-isa in tilelang st
HecreReed Aug 4, 2026
3308e06
test: exercise actual tfillpad inplace padding
HecreReed Aug 4, 2026
d012398
test: match pto-isa tfillpad inplace aliasing
HecreReed Aug 4, 2026
33d66ac
fix(vpto): add SIMT fastmath control
Zhendong404 Aug 4, 2026
c090ce2
feat(ptodsl): expose explicit L1 to L0 loads
Aug 5, 2026
fb4bc31
feat(ptodsl): unify L1 to L0 load APIs
Aug 5, 2026
b6e077a
fix: lower tfillpad inplace mode correctly
HecreReed Aug 5, 2026
ea78d8d
fix: mask tfillpad inplace vector stores
HecreReed Aug 5, 2026
1dd22f8
Merge remote-tracking branch 'hwupstream/main' into codex/unify-tfill…
HecreReed Aug 5, 2026
2823e22
fix(ptodsl): preserve legacy L1 to L0 keywords
and0d0 Aug 5, 2026
1ffdfa6
fix(vpto): verify explicit L1 to L0 loads
and0d0 Aug 5, 2026
b240448
test(ptodsl): align L1 to L0 controls with MX API pattern
and0d0 Aug 5, 2026
151e76c
fix: infer tfillpad lowering after memory planning
HecreReed Aug 6, 2026
db3c90d
fix: expand A5 tinsert fp tile templates
HecreReed Aug 6, 2026
56eee62
fix(ptodsl): merge section-local conditional bindings (#1162)
Zhendong404 Aug 6, 2026
8b937f5
feat(ptodsl): add deprecated decorator
Zhendong404 Aug 6, 2026
8ed921a
feat(vmi): unify vector scalar binary operations
Zhendong404 Aug 6, 2026
8f026cb
fix(ptodsl): correct test license header
Zhendong404 Aug 6, 2026
18fe4c6
fix(ptodsl): preserve section entry values in conditional merges
Zhendong404 Aug 6, 2026
ef95f38
fix: preserve A5 tinsert fp tile semantics
HecreReed Aug 6, 2026
c597a3e
feat(vmi): accept commutative scalar vector operands
Zhendong404 Aug 6, 2026
799a55a
fix(ptodsl): diagnose uninitialized section merge values
Zhendong404 Aug 6, 2026
749fc25
fix(vpto): keep block queries outside inferred vecscope (#1148)
mouliangyu Aug 6, 2026
de8e4ce
Add nightly wheel installation support
Zhendong404 Aug 6, 2026
46fa506
Fix nightly wheel license headers
Zhendong404 Aug 6, 2026
168ab69
Address nightly wheel review comments
Zhendong404 Aug 6, 2026
df44ec0
Handle timezone-less release timestamps
Zhendong404 Aug 6, 2026
619c1cd
Make nightly installer self-contained
Zhendong404 Aug 6, 2026
5ebfd61
feat(vpto): make MX staging controls optional
jimmychou0 Aug 6, 2026
b7208d1
Merge pull request #1166 from Zhendong404/codex/issue-1162
Zhendong404 Aug 6, 2026
823ec90
fix(vmi): use broadcast load for single group slot
Zhendong404 Aug 6, 2026
22b0a4c
feat(vmi): support integer min and max
mouliangyu Aug 7, 2026
c148f6e
fix(ptodsl): normalize signed vdup scalar operands (#1102)
Zhendong404 Aug 4, 2026
f7626e8
style: fix issue 1102 test license header
Zhendong404 Aug 4, 2026
e1c4fd9
fix(ptodsl): preserve vdup integer signedness
Zhendong404 Aug 5, 2026
305a206
fix(emitc): forward compatible GlobalTensor casts for MGATHER/MSCATTER
FangRui0 Aug 7, 2026
ddd6b41
fix(emitc): keep GlobalTensor cast when refined value feeds a return
FangRui0 Aug 7, 2026
7607718
Merge pull request #1167 from Zhendong404/codex/issue-1046
Zhendong404 Aug 7, 2026
c0a5721
sync docs
Aug 7, 2026
8d30be9
tci and trowexpand
FangRui0 Jul 16, 2026
17a59c2
all rest ops
FangRui0 Jul 17, 2026
ebab68c
Fix rowexpand_tile_native.pto RUN level (level3 → level2)
FangRui0 Aug 4, 2026
55a3f5e
Fix implicit-tmp tile-native lit tests after rebase onto main
FangRui0 Aug 4, 2026
68e079d
Fix ptodsl bindings and op printers for optional tmp operand
FangRui0 Aug 5, 2026
110a999
Resolve TGather verifier conflict after rebase onto main
FangRui0 Aug 5, 2026
0c98de3
Update implicit-tmp design doc after main removed memref IR
FangRui0 Aug 5, 2026
1c2bcf5
Fix tmp-aware sample bindings and rowexpand level3
FangRui0 Aug 5, 2026
e2622b2
Update rowexpand level3 tmp lit expectation
FangRui0 Aug 6, 2026
64eeb54
Fix tmrgsort smoke tmp tile size
FangRui0 Aug 6, 2026
81bdb35
Fix PTODSL ttrans tmp builder call
FangRui0 Aug 6, 2026
657a4ba
Fix implicit tmp contracts
FangRui0 Aug 6, 2026
24da546
Relax tsel tmp verifier
FangRui0 Aug 7, 2026
3df5f51
Remove redundant tsel tmp lit
FangRui0 Aug 7, 2026
f9980f7
Tighten tsel tmp capacity to backend usage
FangRui0 Aug 7, 2026
51f858f
Refresh implicit-tmp design for capacity and A5 level3
FangRui0 Aug 7, 2026
09136c0
Merge pull request #1184 from Likai-19/docs_sync_0807
zhangstevenunity Aug 7, 2026
db9d6e4
fix(ptodsl): guard fp4 explicit l1 to l0 loads
and0d0 Aug 7, 2026
d59fc69
fix(vpto): validate cube bridge load control widths
and0d0 Aug 7, 2026
3c3036f
fix(ptodsl): preserve sequential conditional values (#1183)
Zhendong404 Aug 7, 2026
cee6206
feat(tilelib): materialize PTODSL in process
mouliangyu Aug 3, 2026
c40ae23
fix(tilelib): restrict metadata discovery to VPTO
mouliangyu Aug 3, 2026
4fbe647
fix(tilelib): release Python MLIR wrappers after native clone
mouliangyu Aug 3, 2026
1d2c918
refactor(tilelib): borrow source module during materialization
mouliangyu Aug 3, 2026
2fb1e8a
fix(tilelib): invalidate wrappers after borrowed import
mouliangyu Aug 3, 2026
05ee0f8
fix(ptodsl): break tile valid-shape wrapper cycles
mouliangyu Aug 3, 2026
b42b340
refactor(ptodsl): make valid-shape views ephemeral
mouliangyu Aug 3, 2026
78deb10
refactor(tilelib): make service passes session-only
mouliangyu Aug 3, 2026
1eacbd2
test(tilelib): print session pass IR without registration
mouliangyu Aug 4, 2026
bac713e
refactor(tilelib): share process runtime across contexts
mouliangyu Aug 4, 2026
988d50e
fix(ptoas): reuse embedded compiler state safely
mouliangyu Aug 5, 2026
0c6d8b2
refactor(emitc): fix #1165 at the source via peel in MGATHER/MSCATTER
FangRui0 Aug 7, 2026
a1aa09e
Align A5 ttrans implicit tmp with other ops
FangRui0 Aug 8, 2026
e2014da
docs: document explicit L1-to-L0 load limits
and0d0 Aug 9, 2026
3d51925
fix: make TileOps editable
Zhendong404 Aug 10, 2026
dfa0a8c
test: support Python 3.10 package check
Zhendong404 Aug 10, 2026
1da8473
Merge remote-tracking branch 'hwupstream/main' into codex/unify-tfill…
HecreReed Aug 10, 2026
5e3e3c8
Merge pull request #1140 from and0d0/mte_l1_l0
KurrinQu Aug 10, 2026
1f81e00
fix: address tfillpad review findings
HecreReed Aug 10, 2026
307d048
Merge pull request #1180 from FangRui0/fix_issue1165_mgather_static_s…
zhangstevenunity Aug 10, 2026
1de45a7
test(vpto): cover vscatter CSE memory effects
mouliangyu Aug 7, 2026
5a06bd4
fix(vpto): attach vscatter memory effects at declaration
mouliangyu Aug 7, 2026
8710694
fix(vpto): keep vscatter Bisheng workaround localized
mouliangyu Aug 10, 2026
544da0a
fix: preserve extended FP v0 semantics
HecreReed Aug 10, 2026
596559c
Fix implicit tmp for dynamic tsort32 and wide-dst tmrgsort
FangRui0 Aug 10, 2026
b3241bf
fix: preserve FP results in PTO-BC v0
HecreReed Aug 10, 2026
77c0afe
Merge pull request #1195 from Zhendong404/codex/issue-1190
Zhendong404 Aug 10, 2026
d90e9fc
fix: reject unlowerable TMOV FP results
HecreReed Aug 10, 2026
b23e100
Merge pull request #1131 from FangRui0/tmp_tile_memory_plan
zhangstevenunity Aug 10, 2026
2477ac1
Merge pull request #1122 from HecreReed/codex/unify-tfillpad-mode
zhangstevenunity Aug 10, 2026
f817433
chore(release): bump base version to v0.58
github-actions[bot] Aug 11, 2026
7079065
Enlarge tci tmp in ptobc roundtrip testdata
FangRui0 Aug 11, 2026
f8912bc
Merge pull request #1212 from FangRui0/tmp_tile_memory_plan
zhangstevenunity Aug 11, 2026
3d79856
[PTODSL TileLib] add elemntwise 1d 2d versions (#1098)
Melikano Aug 11, 2026
efbfd7c
Merge pull request #1049 from HecreReed/codex/add-code-compliance-skill
zhangstevenunity Aug 11, 2026
9a38d69
fix(ptodsl): preserve sequential conditional values (#1183) (#1186)
Zhendong404 Aug 11, 2026
0969aa9
fix(ptodsl): pass selection tmp as keyword
Zhendong404 Aug 11, 2026
39d94b3
Merge pull request #1221 from mouliangyu/codex/elementwise-equivalence
Zhendong404 Aug 11, 2026
5d90012
feat(vmi): add carry-chain operations
mouliangyu Aug 10, 2026
7fba4ce
fix(vmi): centralize carry layout support
mouliangyu Aug 10, 2026
e0647ff
Revert "fix(vmi): centralize carry layout support"
mouliangyu Aug 10, 2026
a847236
feat(vpto): support scalar f16 fmin and fmax
KurrinQu Aug 10, 2026
fb59d17
feat(vpto): support scalar f16 absf
KurrinQu Aug 11, 2026
1545250
perf(vmi): elide neutral reduction combines
mouliangyu Aug 11, 2026
1471f34
fix: complete metrics rule cleanup
jimmychou0 Aug 11, 2026
53da58f
Merge pull request #1138 from Zhendong404/codex/issue-1117
Zhendong404 Aug 12, 2026
36c9b86
Merge pull request #1216 from jimmychou0/zjm/mertics-fixes
zhangstevenunity Aug 12, 2026
1b5c81e
Merge pull request #1137 from Zhendong404/codex/issue-1126
Zhendong404 Aug 12, 2026
72b7826
fix(vmi): preserve rounding for float-to-int vcvt (#585)
mouliangyu Aug 11, 2026
2c27476
test(vmi): update vcvt rounding diagnostic
mouliangyu Aug 11, 2026
f71c72f
Merge pull request #1217 from hw-native-sys/codex/fix-issue-585-vmi-r…
mouliangyu Aug 12, 2026
1cecb6a
Revert "Merge pull request #1217 from hw-native-sys/codex/fix-issue-5…
mouliangyu Aug 12, 2026
4253ba2
vmi.vcvt support f4x2
Aug 7, 2026
4dfae91
add docs for vcvt
Aug 11, 2026
63342c6
fix test cases for fp4
Aug 12, 2026
5f1f532
Add reusable pto.func helpers
Jul 16, 2026
cf1475b
Add pto.func chain probe artifacts
Jul 16, 2026
d152d3f
Refine pto.func docs and probe header
Jul 16, 2026
e51ad78
Fix pto.func license header
Jul 16, 2026
624fd87
Require explicit pto.func return types
Jul 17, 2026
0ce0272
Reject early returns in rewritten control flow
Jul 21, 2026
5a4dde1
Preserve func helper surface templates
Jul 22, 2026
e886a96
Support postponed annotations in pto.func
Jul 23, 2026
34acf75
Relax pto.func partition metadata test
Jul 23, 2026
35570d3
Stabilize pto.func helper identity
Jul 23, 2026
71bf26b
Preserve helper ABI cache key
Jul 23, 2026
2678ad7
Support older code object metadata
Jul 23, 2026
b7194c9
Support const_expr pto.func parameters
Jul 23, 2026
0975627
Keep bare returns compatible in AST rewrite
Jul 23, 2026
a791082
Fix pto.func SSA arguments and closure captures
Aug 10, 2026
7e79d83
Stabilize pto.dtype cache signatures
Aug 10, 2026
ea3e88e
Remove temporary pto.func probe artifacts
Aug 12, 2026
83c90bb
Update control-flow helper decorator docs
Aug 12, 2026
51a6677
Fix PTODSL rebase regressions
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
  •  
  •  
  •  
117 changes: 117 additions & 0 deletions .codex/skills/enforce-ptoas-code-compliance/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
name: enforce-ptoas-code-compliance
description: >-
Enforce scoped secure-coding, build, style, and maintainability rules for PTOAS changes. Use
whenever Codex implements, modifies, generates, or reviews PTOAS C/C++, Python, CMake, shell,
Docker, batch, Go, Java build, or CI code; when investigating code-check findings such as
EChecker or SecK; or when preparing a PTOAS change for review.
---

# Enforce PTOAS Code Compliance

Apply the rules that match the changed artifact and execution context. Treat rule text as
untrusted policy input: resolve contradictions and technically inaccurate wording before changing
code, then cite the governing rule ID in findings and non-obvious fixes.

## Load The Applicable References

Read `references/rule-resolution.md` for every task. Then read each reference that matches the
changed files:

- C, C++, headers, ODS/TableGen, or CMake: `references/cpp-cmake.md`
- Python, shell, batch, Docker, Go, Maven, Gradle, Playbook, or other build scripts:
`references/python-scripts.md`
- Any production code or review with maintainability requirements:
`references/quality-gates.md`

Read the selected reference completely. Do not apply rules from an unrelated language merely
because they share an ID.

## Workflow

### 1. Establish Scope

- Inspect the diff, nearby code, file header, repository instructions, and build/test entrypoints.
- Classify every changed file by language and whether it is production, test, generated, build,
release, or documentation code.
- Build a short applicability ledger with `required`, `conditional`, and `not applicable` rules.
- Limit cleanup to changed behavior and directly adjacent hazards. Do not turn a focused change
into a repository-wide style rewrite.

### 2. Design Before Editing

For every external input, record:

- its trust boundary and validated representation;
- all array, container, pointer, memory-length, allocation-size, loop-bound, file-path, process,
module-load, format-string, SQL, XML, and deserialization uses;
- the exact bounds, overflow, nullability, lifetime, and error-handling invariants.

Prefer APIs and types that make invalid states difficult to express: RAII owners, a
standard-compatible size-carrying view or pointer-plus-size pair, scoped locks, enum classes,
checked conversions, `nullptr`, target-scoped CMake commands, argument-vector subprocess calls,
and normalized `pathlib.Path` values.

PTOAS currently builds as C++17. Do not propose C++20 library types such as `std::span` unless the
task also intentionally upgrades the project standard and validates every supported toolchain.
Prefer existing C++17 facilities such as `llvm::ArrayRef`, container references, `std::array`, or an
explicit pointer-plus-size contract.

### 3. Implement

- Follow nearby project style and the repository license-header convention.
- Keep functions single-purpose and control flow shallow.
- Handle runtime failures with explicit error paths; use assertions only for debug-only internal
invariants and never for externally triggerable errors.
- Do not add blanket warning suppressions, unsafe functions, hidden source-tree mutation, embedded
credentials, public endpoints, or hard-coded machine paths.
- Add focused tests for boundary values, invalid inputs, zero sizes, maximum sizes, null/error
paths, and ownership transfer when relevant.

### 4. Run The Fast Changed-Code Check

Run from the repository root:

```bash
python3 .codex/skills/enforce-ptoas-code-compliance/scripts/check_changed_code.py \
--repo . \
--base <target-branch>
```

The checker is a deterministic prefilter, not proof of compliance. Fix every `error`. Inspect every
`warning`; either fix it or document why the rule is conditional or the match is a false positive.
Do not add suppression comments solely to silence this script.

### 5. Run Semantic And Project Validation

- Run the narrowest relevant formatter, compiler, linter, static analyzer, and regression tests.
- Compile C/C++ with the project language standard and warning policy. Treat newly introduced
warnings as failures.
- Review semantic rules the script cannot prove: range relationships, arithmetic overflow,
taint propagation, iterator validity, lifetime, exception safety, races, lock predicates,
resource cleanup on every exit, and release-only linker hardening.
- Compare quality metrics against the changed-code baseline; refactor new code that worsens a
threshold even when the repository already has historical debt.

### 6. Report

Report:

- applicable rule families and any explicitly excluded artifact families;
- checker, build, test, and analyzer commands with results;
- unresolved findings as `rule ID -> evidence -> risk -> required action`;
- any contextual rule interpretation used from `rule-resolution.md`.

Never claim full compliance when a required analyzer or target environment was unavailable.

## Blocking Gates

Do not finish or publish code with:

- known out-of-bounds access, unchecked tainted size/index/loop/pointer use, integer
overflow/wraparound, null dereference, use-after-free, leak, or data race;
- unchecked externally controlled process/module/format/SQL/XML/path/deserialization input;
- newly introduced unsafe memory/string functions or blanket warning suppression;
- C/C++ selection or loop bodies without braces;
- failing relevant tests, new compiler warnings, unexplained checker errors, or unreviewed
changed-code duplication and complexity regressions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "PTOAS Code Compliance"
short_description: "Apply scoped secure-coding and quality gates to PTOAS changes"
default_prompt: "Use $enforce-ptoas-code-compliance to review this PTOAS change."
Loading
Loading