gpu: add SSE2 fallbacks for fault-tolerant memory kernels #564
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/564"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from readmet3xt-lab/foxhound. Originally posted by Khayoon on 2026-12-03T14:24:43Z.
The host-memory put, change-detection, merge and comparison paths currently assume AVX2. On a baseline x64 CPU, a valid call can therefore raise an illegal-instruction exception before it can report a memory fault.
Add SSE2/GPR implementations selected when AVX2 is unavailable, with
VICTORY_HOST_BASELINE=1available to exercise them on newer CPUs. The existing AVX2 path stays selected by default on supported CPUs. The new leaf kernels use the same write-watch fault exits and preserve changed-dword-only writes, completed-record snapshots and merge counts. The plain copy kernel is unchanged.Five synthetic regressions exercise changed-dword selection, an incomplete record straddling an inaccessible page, merge byte selection and counts, failed-block snapshot/count preservation, and bounded comparison reads at a page edge. They call the baseline kernels directly, including on AVX2 runners.
This is host-runtime portability work. It does not by itself enable all guest instructions on an older CPU or establish a frame-rate improvement.
Validation on Intel i7-3930K (AVX1, no AVX2), Windows 10 build 19045, Rust 1.98.1, baseline compiler target:
cargo test --locked -p victory-gpu --lib safecopy::tests -- --test-threads=1 --nocapture: 13 passed, 0 failed, 1 ignored (the measurement).safecopy::tests::only_changed_dwords_are_putpublic-API test exits with0xc000001d / STATUS_ILLEGAL_INSTRUCTIONon this CPU. Green: the patched suite passes before and after that comparison.cargo clippy --locked -p victory-gpu --all-targets -- -D warnings: passed.cargo run --locked -p xtask -- policy: 329 files OK.git diff --check: passed.AI-assisted: yes. Port prepared with OpenAI Codex; separate read-only review by GPT-6.1 Sol.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.