Tests: heap probes for aliased buffers and timestamp queries #1328
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!1328
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1328"
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?
@vakaobr on GitHub · 2026-11-24 14:48 UTC · original
vakaobr:tests/heap-probes→main· +126 −0 · 1 files · 1 commits · openPart of #258. Two probes from Ahmet-Dedeler's
c70bf8athat check what the unified memory copy path relies on: that buffers placed over the same video memory see each other's writes, and how timestamp queries resolve into committed and reserved buffers. Like the other tests inheap_probe.rs, they are#[ignore]probes that print what the host does; run them with--ignored.Based on Ahmet-Dedeler's
c70bf8aonmac-on-main-wip("Unified memory without OpenExistingHeapFromAddress: the committed window gets a copy in video memory"), which he handed over in https://github.com/ivall/xcl/issues/258#issuecomment-7134093997. Rebased ontomain930e8b4and split into four PRs.What is in it
crates/xcl/tests/heap_probe.rs:buffers_over_the_same_video_memory_alias(placed buffers over one heap, and reserved buffers whose tiles map to one pool tile) andtimestamp_query_resolved_into_committed_and_reserved_buffers.Tested
x86_64-pc-windows-gnu(mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<test exe> --exact <test> --test-threads=1 --nocapture).a146528,--ignored: both pass. The aliasing probe printstruefor placed and for reserved buffers; the timestamp probe prints a frequency of 60 and a resolved value of0x0(D3DMetal's timestamps, see #996).cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 43 ignored on both; with--ignoredall 6 probes in the file pass, the aliasing probe printingtruefor both cases and the timestamp probe a frequency of 1 GHz and non-zero timestamps (@futurepro62, https://github.com/ivall/xcl/pull/1328#issuecomment-7135279215).Regression run
Test-only change in
crates/xcl/tests/: noxcl-smokeblocks.Not tested
AI use
c70bf8a. Claude Code with Claude Opus 5.5 reviewed them, ran them on this machine and wrote this description.@futurepro62 on GitHub · 2026-11-24 14:59 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
a146528(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 43 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 43 ignored, no skips.#[ignore], so I ran them explicitly withcargo test -p xcl --test heap_probe -- --ignored --nocapture --test-threads=1(all 6 probes in the file: 6 passed).buffers_over_the_same_video_memory_alias: "placed buffers over each other in one heap: written through the whole one, read through the part: true" and "two reserved buffers on one pool tile: written through the window, read through the other: true".timestamp_query_resolved_into_committed_and_reserved_buffers: frequency 1000000000, a non-zero timestamp resolved into both the committed and the reserved buffer.heap_probe.rscreates its device withD3D12CreateDevice(None, ...), soXCL_ADAPTER=radeondoes not reach them (a run with it printed the same adapter-specific values).Not tested
AI use
@WASDeKeys on GitHub · 2026-11-24 15:05 UTC · original
im trying to run a test only pr too, but my pr is getting flagged on the smoke check thing. How did you pass the checks without smoke test?
@vakaobr on GitHub · 2026-11-24 15:09 UTC · original
@WASDeKeys:
scripts/pr_check.pyasks for the smoke pair only when the PR changes a runtime file: a path undercrates/xcl/src/that neither contains/testsnor ends intests.rs. This PR only touchescrates/xcl/tests/heap_probe.rs, so the check passes without one. If your test-only change sits in a runtime file (a#[cfg(test)] mod testsinside, say,present.rs), the check treats it as runtime: either move the test into the module'stests.rsorcrates/xcl/tests/if it fits there, or get a smoke pair (#957 got one from mikebuckets171 in #258). Thetest-onlylabel that CONTRIBUTING mentions would waive it, but it doesn't exist in the repo yet.AI use: Claude Code, Claude Opus 5.5 drafted this reply.
@JoaoPauluu on GitHub · 2026-11-24 15:09 UTC · original
The probes on Linux with vkd3d-proton (NVIDIA), next to the D3DMetal and Windows runs.
Tested
x86_64-pc-windows-gnu.a146528as it is (based on930e8b4), no uncommitted changes. The test binary runs under Wine, each probe in its own process (--exact <test> --ignored --nocapture --test-threads=1).heap_probe.rspass.buffers_over_the_same_video_memory_alias:placed buffers over each other in one heap: written through the whole one, read through the part: true,two reserved buffers on one pool tile: written through the window, read through the other: true.timestamp_query_resolved_into_committed_and_reserved_buffers:timestamp frequency: Ok(1000000000), resolved into a committed buffer0x18eb03b650604400, into a reserved buffer0x18eb03b650620000. So here the timestamps are real, nanosecond values, unlike D3DMetal's0x0(#996).--ignoredthe six are reportedignored, as intended. I did not run the probes onmain.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 15:14 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 708 passed, 0 failed, 21 ignored.Thanks!
@WASDeKeys on GitHub · 2026-11-24 15:16 UTC · original
@vakaobr so if my pr changes in vram.rs, and it is a runtime file, but only a test chage, theres no way to get the pr approved
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.