Repository navigation
GPU: find the position input once per CPU rectangle batch - #3705
Open
andrewpozdnakov7-jpg wants to merge 1 commit into
Open
andrewpozdnakov7-jpg wants to merge 1 commit into
andrewpozdnakov7-jpg wants to merge 1 commit into
Conversation
Contributor
Author
|
Both Clippy steps and all nine primitive tests passed in Windows CI on The local exact-source comparison and both Clippy configurations also passed. AI-assisted with OpenAI Codex. |
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.
The CPU rectangle fallback uses the first in-stride float input with two or more components to identify the right-angle corner. Find that input once for the batch. Each rectangle still reads its own coordinates and reconstructs the same fourth vertex.
An optimized Windows x64 test compared the exact old and new expansion functions with the same right-angle routine. All bytes matched for 4,096 generated rectangles in each of five layouts, including F32, F16 and the fallback without a position input. The test also checked incomplete buffer tails.
Across nine alternating pairs, the five layouts took 1.6–5.5% less time per rectangle at batch size 1,024 and 2.8–6.2% less time at batch size 4,096. Single-rectangle results ranged from 3.8% faster to 4.7% slower. These timings cover the CPU expansion step. All nine primitive tests, both GPU Clippy configurations and the asset policy passed.
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <andrewpozdnakov7-jpg@users.noreply.github.com>if folding the change into another commit.AI-assisted with OpenAI Codex.