Tests: wait for the last deferred CPU write #1347
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1347
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1347"
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?
@ebarr24 on GitHub · 2026-11-24 15:04 UTC · original
ebarr24:tests/cpu-writes-last-dword→main· +8 −6 · 1 files · 1 commits · openThe deferred CPU-write test can observe the first dword before the worker stores the second. This is the intermittent failure reported in #546. The test now waits for the final store before reading both results.
What is in it
cpu_writes.rs's test module, wait for the last immediate dword with an acquire load, then check the first. Keep the atomic destination alive if the test times out while the worker is still queued.Tested
scripts/test.ps1withXCL_ADAPTER=3080andXCL_REQUIRE_GPU=meshon both base930e8b4and head5ec0cf4. Each run reported 751 passed, 0 failed, and 41 ignored. Two native-wave64 tests returned early and are included in the reported passes.5ec0cf4, 32 fresh libtest processes each passed bothcpu_writes::testscases with--test-threads=2.cb868b2held the second store briefly. The original polling order observed a zero second word in all three runs. Waiting for the final store passed all three runs with the same delay. The test in this PR uses the regular worker.Regression run
The diff is confined to one unit test in a runtime file and qualifies for maintainer review under the
test-onlylabel.Not tested
AI use
@futurepro62 on GitHub · 2026-11-24 15:17 UTC · original · edited 2026-11-24 15:22 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
5ec0cf4(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.#[test]functions in the diff.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
@JoaoPauluu on GitHub · 2026-11-24 15:33 UTC · original
Under Wine on Linux, with an
x86_64-pc-windows-gnubuild, the changed test fails every time at its newwritablecheck, wheremainpasses.Tested
x86_64-pc-windows-gnu(mingw-w64 GCC 16.2.0).5ec0cf4as it is andmain930e8b4, no uncommitted changes. The lib test binary runs under Wine.cpu_writestests (readback_u64_lands_after_the_queue,writes_land_after_the_queue, andtitle_textures::…gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes, which the filter also matches), 20 runs each,--test-threads=1:main930e8b4: 20 of 20 ok.cpu_writes.rs:185,assertion failed: writable(va, std::mem::size_of_val(&WORDS)).VirtualQueryforWORDS, reverted afterwards:state 0x1000(MEM_COMMIT),protect 0x8(PAGE_WRITECOPY),alloc_protect 0x80,type 0x1000000(MEM_IMAGE). The static lands in the image's.bss(0x140a6d000), a page nothing has written yet, andwritable()accepts onlyPAGE_READWRITE/PAGE_EXECUTE_READWRITE.PAGE_WRITECOPYuntil they are first written. So this may not be Wine-specific. Whether it shows up there probably depends on whether something else has already written that page (the MSVC and GNU layouts differ). I have not run it on Windows.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 16:17 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (One run showed a single flaky failure / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@Toons29 on GitHub · 2026-11-25 03:25 UTC · original
Regression run of
5ec0cf4aon the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 101 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.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.