GPU: compare four complete landing blocks before checking the tail #1545

Open
faycalbaklouti wants to merge 1 commit from upstream-pr/1545 into main
faycalbaklouti commented 2026-11-30 21:58:17 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by faycalbaklouti on 2026-11-30T21:58:17Z.


What it changes

Process four complete 32-byte AVX2 blocks at a time, then compare the remaining complete blocks and the existing scalar byte tail. No new CPU feature or alignment requirement. The existing per-byte change oracle now also crosses the second 128-byte boundary. On the source branch a CPU microbenchmark comparing equal 4 KiB buffers measured 78.1 ns before and 43.7 ns after (phase 87c report, line 7). These are source-workload timings, not measurements on this branch or a frame-time result.

Base: 368967f8, crates/victory-gpu/src/safecopy.rs:309.

How it was tested

Windows-target workspace comparison against 368967f8fe at head 84de3c4530. BASELINE-IDENTICAL. Both Clippy variants fail on the base precedence lint. Workspace tests execute and stop in the GPU unit suite with the same five failing assertions on both SHAs. This is baseline-identical on the Windows target under Wine, not a green native Windows run. The separate touched-package suite and each named head witness satisfy the package gate; clean-base zero matches are not passes.

head clippy: exit 101
error: operator precedence might not be obvious
error: could not compile `victory-formats` (lib test) due to 1 previous error
head all-features: exit 101
error: operator precedence might not be obvious
error: could not compile `victory-formats` (lib test) due to 1 previous error
head test: exit 101
    Finished `test` profile [unoptimized] target(s) in 35.93s
test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.33s
test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
test result: ok. 42 passed; 0 failed; 5 ignored; 0 measured; 0 filtered out; finished in 6.38s
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: FAILED. 411 passed; 5 failed; 35 ignored; 0 measured; 0 filtered out; finished in 12.18s
error: test failed, to rerun pass `-p victory-gpu --lib`
base clippy: exit 101
error: operator precedence might not be obvious
error: could not compile `victory-formats` (lib test) due to 1 previous error
base all-features: exit 101
error: operator precedence might not be obvious
error: could not compile `victory-formats` (lib test) due to 1 previous error
base test: exit 101
    Finished `test` profile [unoptimized] target(s) in 36.20s
test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.33s
test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
test result: ok. 42 passed; 0 failed; 5 ignored; 0 measured; 0 filtered out; finished in 6.41s
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: FAILED. 411 passed; 5 failed; 35 ignored; 0 measured; 0 filtered out; finished in 12.28s
error: test failed, to rerun pass `-p victory-gpu --lib`
Clippy: crates/victory-formats/src/texture.rs:1346:55 (`operator precedence might not be obvious`). Tests: cores.rs:171 (`cpu_sets` empty); watch.rs:5075 (two placeholder checks), 5204 (no mapping), 3494 (known holes). The Wine child and display wrapper return 101 from the failing test binary. See both raw test logs for exact names and summaries. Per-package commands and exact-name comparisons: PACKAGE-TESTS.json, order 14.
Touched-package validation, Windows target under Wine:
head 84de3c4530: cargo xwin test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib — exit 101
test result: FAILED. 411 passed; 5 failed; 35 ignored; 0 measured; 0 filtered out; finished in 12.30s
head 84de3c4530: cargo xwin test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib -- --exact safecopy::tests::differences_are_seen_wherever_they_are --nocapture --test-threads=1 — exit 0
test safecopy::tests::differences_are_seen_wherever_they_are ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 450 filtered out; finished in 0.00s
base 368967f8fe: cargo xwin test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib — exit 101
test result: FAILED. 411 passed; 5 failed; 35 ignored; 0 measured; 0 filtered out; finished in 11.98s
base 368967f8fe: cargo xwin test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib -- --exact safecopy::tests::differences_are_seen_wherever_they_are --nocapture --test-threads=1 — exit 0
test safecopy::tests::differences_are_seen_wherever_they_are ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 450 filtered out; finished in 0.00s
Matched package failures: cores::tests::the_fast_cores_are_those_of_the_best_class_if_there_is_a_worse_one, watch::many_askers_tests::bits_and_holes_with_faults_that_take_no_lock, watch::many_askers_tests::holes_are_known_until_the_runtime_tells, watch::many_askers_tests::no_mapping_is_lost_between_askers, watch::tests::what_is_left_alone_is_no_known_hole
Measured source microbenchmark: p87c-handoff/REPORT.md:7; p87c-handoff/bench/final.txt:4–5. Equal 4 KiB buffers: 78.1 ns before, 43.7 ns after. Not a frame-time result.

No native Windows Actions, live title, or GPU validation is claimed.


Radicle project hub (open-source porting and preservation history): https://radicle.network/nodes/rosa.radicle.network/rad:z3rqQw7796wMbgj8RszExtWR4wMSE
Live development stream: https://vdo.ninja/?view=gta6rtx4090live1080p60

<!-- greyfinch-sync:fxceless/victory-fork:issue:5574506389 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1545). Originally posted by [faycalbaklouti](https://github.com/faycalbaklouti) on 2026-11-30T21:58:17Z. --- ## What it changes Process four complete 32-byte AVX2 blocks at a time, then compare the remaining complete blocks and the existing scalar byte tail. No new CPU feature or alignment requirement. The existing per-byte change oracle now also crosses the second 128-byte boundary. On the source branch a CPU microbenchmark comparing equal 4 KiB buffers measured 78.1 ns before and 43.7 ns after (phase 87c report, line 7). These are source-workload timings, not measurements on this branch or a frame-time result. Base: `368967f8`, `crates/victory-gpu/src/safecopy.rs:309`. ## How it was tested Windows-target workspace comparison against `368967f8fe` at head `84de3c4530`. BASELINE-IDENTICAL. Both Clippy variants fail on the base precedence lint. Workspace tests execute and stop in the GPU unit suite with the same five failing assertions on both SHAs. This is baseline-identical on the Windows target under Wine, not a green native Windows run. The separate touched-package suite and each named head witness satisfy the package gate; clean-base zero matches are not passes. ```text head clippy: exit 101 error: operator precedence might not be obvious error: could not compile `victory-formats` (lib test) due to 1 previous error head all-features: exit 101 error: operator precedence might not be obvious error: could not compile `victory-formats` (lib test) due to 1 previous error head test: exit 101 Finished `test` profile [unoptimized] target(s) in 35.93s test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.33s test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s test result: ok. 42 passed; 0 failed; 5 ignored; 0 measured; 0 filtered out; finished in 6.38s test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s test result: FAILED. 411 passed; 5 failed; 35 ignored; 0 measured; 0 filtered out; finished in 12.18s error: test failed, to rerun pass `-p victory-gpu --lib` base clippy: exit 101 error: operator precedence might not be obvious error: could not compile `victory-formats` (lib test) due to 1 previous error base all-features: exit 101 error: operator precedence might not be obvious error: could not compile `victory-formats` (lib test) due to 1 previous error base test: exit 101 Finished `test` profile [unoptimized] target(s) in 36.20s test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.33s test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s test result: ok. 42 passed; 0 failed; 5 ignored; 0 measured; 0 filtered out; finished in 6.41s test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s test result: FAILED. 411 passed; 5 failed; 35 ignored; 0 measured; 0 filtered out; finished in 12.28s error: test failed, to rerun pass `-p victory-gpu --lib` Clippy: crates/victory-formats/src/texture.rs:1346:55 (`operator precedence might not be obvious`). Tests: cores.rs:171 (`cpu_sets` empty); watch.rs:5075 (two placeholder checks), 5204 (no mapping), 3494 (known holes). The Wine child and display wrapper return 101 from the failing test binary. See both raw test logs for exact names and summaries. Per-package commands and exact-name comparisons: PACKAGE-TESTS.json, order 14. Touched-package validation, Windows target under Wine: head 84de3c4530: cargo xwin test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib — exit 101 test result: FAILED. 411 passed; 5 failed; 35 ignored; 0 measured; 0 filtered out; finished in 12.30s head 84de3c4530: cargo xwin test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib -- --exact safecopy::tests::differences_are_seen_wherever_they_are --nocapture --test-threads=1 — exit 0 test safecopy::tests::differences_are_seen_wherever_they_are ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 450 filtered out; finished in 0.00s base 368967f8fe: cargo xwin test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib — exit 101 test result: FAILED. 411 passed; 5 failed; 35 ignored; 0 measured; 0 filtered out; finished in 11.98s base 368967f8fe: cargo xwin test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib -- --exact safecopy::tests::differences_are_seen_wherever_they_are --nocapture --test-threads=1 — exit 0 test safecopy::tests::differences_are_seen_wherever_they_are ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 450 filtered out; finished in 0.00s Matched package failures: cores::tests::the_fast_cores_are_those_of_the_best_class_if_there_is_a_worse_one, watch::many_askers_tests::bits_and_holes_with_faults_that_take_no_lock, watch::many_askers_tests::holes_are_known_until_the_runtime_tells, watch::many_askers_tests::no_mapping_is_lost_between_askers, watch::tests::what_is_left_alone_is_no_known_hole Measured source microbenchmark: p87c-handoff/REPORT.md:7; p87c-handoff/bench/final.txt:4–5. Equal 4 KiB buffers: 78.1 ns before, 43.7 ns after. Not a frame-time result. ``` No native Windows Actions, live title, or GPU validation is claimed. --- **Radicle project hub (open-source porting and preservation history):** https://radicle.network/nodes/rosa.radicle.network/rad:z3rqQw7796wMbgj8RszExtWR4wMSE **Live development stream:** https://vdo.ninja/?view=gta6rtx4090live1080p60
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1545:upstream-pr/1545'
git switch 'upstream-pr/1545'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1545'
git switch 'upstream-pr/1545'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1545'
git switch 'upstream-pr/1545'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1545'
git switch 'main'
git merge --squash 'upstream-pr/1545'
git switch 'main'
git merge --ff-only 'upstream-pr/1545'
git switch 'main'
git merge 'upstream-pr/1545'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!1545
No description provided.