feat: add TileType bridge and PTO capability manifest#256
feat: add TileType bridge and PTO capability manifest#256zhoubot wants to merge 1 commit intozhangstevenunity:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: faf5af7a1b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| def _extract_python_type_methods(text: str) -> dict[str, list[str]]: | ||
| type_block_pattern = re.compile( | ||
| r'mlir_type_subclass\(\s*m,\s*"([A-Za-z0-9_]+)"(.*?)(?=^\s*mlir_type_subclass\(\s*m,\s*"[A-Za-z0-9_]+"|^\s*populatePTODialectSubmodule\(m\);)', |
There was a problem hiding this comment.
Stop type-method parsing before attribute blocks
The mlir_type_subclass block regex currently terminates only at the next mlir_type_subclass, so any intervening mlir_attribute_subclass methods are incorrectly attributed to the preceding type. In this tree that already causes TileType to pick up TileBufConfigAttr methods (for example get_default), which makes the generated capability manifest report Python APIs that the type does not actually expose and can invalidate cross-stack capability checks.
Useful? React with 👍 / 👎.
| # This sample intentionally contains NO explicit sync ops. | ||
| # | ||
| # Use it with: | ||
| # ptoas --enable-insert-sync |
There was a problem hiding this comment.
Keep MatMul sample synchronized for default ptoas flow
This change makes the sample depend on auto-inserted sync, but existing repo entry points still compile tmatmulk.pto without --enable-insert-sync while tools/ptoas/ptoas.cpp keeps that flag defaulted to false; in those paths the kernel is now emitted without explicit record_event/wait_event ordering. That can produce race-prone code and incorrect experiment results unless all callers are updated to force auto-sync.
Useful? React with 👍 / 👎.
|
Will support L1 in a few months later. |
Summary
TileType -> bufferbridge in the C API and Python bindingValidation
python3 tools/gen_pto_capability_manifest.pyNotes
TileBufTypeusage is reduced but not fully eliminated yet