Fix VCG group reduction semantics#889
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the documentation and specifications for per-VLane (group) reduction operations (pto.vcgadd, pto.vcgmax, and pto.vcgmin) to clarify that the 8 VLane results are written contiguously to the low elements (indices 0 to 7) of the destination vector, with the remaining elements zeroed out. It also adds a comprehensive micro-op test case to verify these operations. The feedback suggests explicitly clarifying the zero-filling behavior when the vector register is not fully populated (e.g., for larger element types like i64).
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.
| The vector register is organized as **8 VLanes** of 32 bytes each. Group | ||
| reductions operate within each VLane independently and produce one result per | ||
| VLane. The 8 VLane results are written contiguously to the low elements of the | ||
| destination vector; all remaining destination elements are zero. |
There was a problem hiding this comment.
The updated documentation states that group reductions produce one result per VLane and write them contiguously to the low elements of the destination vector. However, the documentation should explicitly clarify the behavior when the vector register is not fully populated (e.g., when the element type has fewer than 64 elements, such as i64 which has 32 elements). Please clarify if the remaining elements are always zero-filled up to the full vector register size N regardless of the element type.
Codex Review该评论由 review 机器人自动更新。
SummaryReview failed at stage Findings未生成结构化 findings,因为 review 过程提前失败。 Log Tail |
Summary
pto.vcgadd,pto.vcgmax, andpto.vcgminValidation
git diff --checkWORK_SPACE=/tmp/pto-vpto-vcg-group CASE_NAME='micro-op/reduction/vcg-group' DEVICE=SIM test/vpto/scripts/run_host_vpto_validation.sh