[codex] Strengthen PTODSL A5 micro flow#4
Merged
Conversation
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.
What changed
This PR strengthens the A5 PTODSL library surface and refreshes the checked-in generated examples.
The main changes are:
pto.ptr(..., space=...)andPtrType(..., memory_space=...)t.../T...entrypoints.ptoexamples.llsidecars only for kernels that are intentionally marked HIVM-lowerableWhy
The old surface still had compatibility shims and did not provide a stable end-to-end proof that PTODSL could produce a kernel which PTOAS lowers into CCE/HIVM intrinsics.
This change makes the PTODSL side stronger in two ways:
llvm.hivm.*Impact
Users can now write and generate pure PTODSL micro kernels without reaching into the A5 internals for pointer typing, and the generated examples clearly distinguish:
The generated A5 artifacts now include:
a5_hivm_vadd_demo.ptoa5_hivm_vadd_demo.lla5_vector_copy.llValidation
Ran:
PYTHONPATH=... python -m pytest -q tests/regression56 passed in 1.04sPYTHONPATH=... python scripts/generate_a5_pto.py --emit-hivm-llvma5_hivm_vadd_demo.ptoconfirms emission of:llvm.hivm.vldsx1.v64f32llvm.hivm.vadd.v64f32.xllvm.hivm.vstsx1.v64f32Current boundary
The canonical passing backend path is now the pure micro PTODSL flow. The higher-level tensor-view and tile-buffer examples remain valuable frontend coverage, but they are not yet the canonical PTOAS VPTO/HIVM lowering path.