Allow alloc_buffer outside SIMT scopes#925
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the restriction that pto.alloc_buffer can only be used inside SIMT subkernels, allowing it to be used in top-level explicit kernels. Documentation and tests are updated to reflect this change. The reviewer pointed out that the error message and docstring for alloc_buffer still contain outdated references to SIMT-only allocations and should be updated for consistency.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| @@ -2351,7 +2335,6 @@ def alloc_buffer(shape, dtype, **kwargs): | |||
| "pto.castptr/pto.addptr and pass the dynamic UB byte count at launch." | |||
There was a problem hiding this comment.
由于此 PR 允许在 SIMT 范围之外声明 alloc_buffer(即作为跨 SIMT 的 buffer),第 2334 行的错误提示信息 "It only allocates SIMT local buffers; ..." 已经不再准确。建议将其更新为更通用的描述,例如 "It only allocates local scratch buffers; ..."。
同时,alloc_buffer 的 docstring(第 2323-2329 行)中也提到了 "Allocate SIMT lane-local scratch storage..." 和 "surrounding SIMT helper",建议一并更新,以保持文档与代码的一致性。
Codex Review该评论由 review 机器人自动更新。
SummaryReview failed at stage Findings未生成结构化 findings,因为 review 过程提前失败。 Log Tail |
e75015a to
6830b3c
Compare
6830b3c to
c69ef5c
Compare
允许alloc_buffer声明于simt外,即视为跨simt的buffer
参考 https://github.com/KurrinQu/PTOAS/blob/qkl/ptoas-persistent-simt-fragment-design/docs/designs/ptoas_persistent_simt_fragment_plan.md
开发中