Fix: align tensormap orchestration tensor handling#337
Fix: align tensormap orchestration tensor handling#337jvjhfhg merged 1 commit intohw-native-sys:mainfrom
Conversation
jvjhfhg
commented
Mar 20, 2026
- Move make_tensor helpers into pto_orchestration_api.h so orchestration code depends on the public header boundary
- Treat batch paged attention accumulator tensors as INOUT and track real heap allocation separately for TensorMap insertion
- Remove redundant PTO2TaskId wrapper helpers and switch runtime code and docs to direct PTO2TaskId accessors
- Move make_tensor helpers into pto_orchestration_api.h so orchestration code depends on the public header boundary - Treat batch paged attention accumulator tensors as INOUT and track real heap allocation separately for TensorMap insertion - Remove redundant PTO2TaskId wrapper helpers and switch runtime code and docs to direct PTO2TaskId accessors
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors tensor handling within the orchestration and runtime components, primarily by relocating tensor factory helpers to a more appropriate header, correcting the parameter type for batch paged attention accumulator tensors to ensure proper memory management, and streamlining the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces several valuable improvements to the tensormap orchestration handling. The changes correctly reclassify accumulator tensors as INOUT and refine the heap allocation tracking logic for TensorMap insertion, which enhances correctness. The codebase is also made more maintainable and readable by refactoring PTO2TaskId usage to direct accessors and moving make_tensor helpers to a more appropriate public API header. The accompanying documentation updates are accurate and helpful. Overall, the changes are well-executed and improve the system's architecture and correctness.