Direct DXIL: lower i64 min/max as compare/select #1946
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!1946
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1946"
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?
@luckyteagirl on GitHub · 2026-11-24 23:46 UTC · original
luckyteagirl:codex/dxil-i64-ops→main· +41 −6 · 2 files · 1 commits · openFollow-up to #1679. On the Radeon RX 6800M with Windows driver
30.0.13002.13003, eachdx.op.binary.i64signed or unsigned min/max variant suspended the D3D12 device during pipeline creation (0x887A0005). This lowers those four forms to i64 comparisons andselect. The direct-DXIL source hash from #1947 keys the translated cache, so no manual translator-version bump is needed.What is in it
ops.rs: use signed or unsigned i64 comparison and select forIMax,IMin,UMax, andUMin; other binary operations keep their current path.ops_tests.rs: compare both output words against CPU signed and unsigned min/max across 32 lanes, including equal high words with different low words.Tested
71acf1f073985faa62ae89701ed35e27199bec1c, based on main6d12f58a229bc73889878a448c64dc3af25eeba0. Windows 11, AMD Radeon RX 6800M, driver30.0.13002.13003, DXC/DXIL 1.9.2609.5,XCL_ADAPTER=6800M,XCL_REQUIRE_GPU=1,XCL_DIRECT_DXIL=1.cargo test --locked -p xcl --lib -j 2 gpu::dxil::ops_tests::int64_bit_ops_match_cpu -- --exact --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored, 0 SKIPPED.cargo test --locked -p xcl --lib -j 2 gpu::dxil::ops_tests:: -- --test-threads=2 --nocapture: 24 passed, 0 failed, 0 ignored, 0 SKIPPED.cargo build --locked --release -p xcl --bins -j 2: passed.f90626676934293a7c3c35cccd77c06299bce32d, the focused i64 GPU test passed on an RX 6750 XT. An independent RTX 3080 Ti run reported 1,154 passed, 0 failed, 46 ignored across the workspace; an RX 6600 run of main2898511plus this change and #2192 reported 1,364 passed, 0 failed, 46 ignored. These are not tests of the rebased commit.71acf1fand its base6d12f58on an RX 7600 XT and Ryzen 5 9600X iGPU. No run lost the device. The seed 783 mismatch count went from 32 to 0 on both GPUs. The RX 7600 XT full suite withXCL_DIRECT_DXIL=1had one extra failure ina_dispatch_with_a_pipeline_still_building_waits_at_the_submit. That test passed 80 of 80 isolated reruns across the two trees and GPUs. Independent report with full counts.SKIPPEDnotices. The focused i64 test passed 3/3 runs in each of HLSL and direct-DXIL modes; the fullgpu::dxil::ops_tests::group passed 24/24. This was a library run, not a title run. Independent NVIDIA report.Regression run
Release binaries, same owned title, RX 6800M, 7 seconds.
Main:
PR head:
Not tested
AI use
OpenAI Codex (GPT-6.2) implemented the change and tests in the existing commit; Codex refreshed the rebased-head focused tests, release build, smoke comparison, and this report. Codex also checked the independent results and drafted the description update.
@upipibi on GitHub · 2026-11-25 00:11 UTC · original
Checked on an RTX 3070 (Ampere, driver 616.56, Windows 11, debug build):
b527347,dxil::/bvh::units pass (121 passed). Thegpu_tests pass withXCL_DIRECT_DXIL=0and1(110 passed each, same asmain).FUZZ_SEED=540 cargo test -p xcl --lib -- debug_seed --ignoredonmain80f4819reportsGPU run: 0 mismatching resultshere (357 instructions,gpu_safe true). It doesn't reproduce on NVIDIA, so it looks like the RX 6800M driver rather than the translator's lowering.This PR also bumps
TRANSLATOR_VERSION7→8, as #1950 and #1952 do. Whichever merges later needs the next number.AI-assisted (Claude Code). Synthetic tests only.
@DavidM1911 on GitHub · 2026-11-25 02:50 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@fallow64 on GitHub · 2026-11-25 04:03 UTC · original
Confirmed on AMD RX 6750 XT, driver
32.0.21045.5002, Windows 11 build 26200, exact headf9062667.int64_bit_ops_match_cpu: 1 passed, 0 failed, no skips.Stacked after #1974, this also clears the seed-783 i64
IMaxmismatch.Not tested: full suite or retail title.
AI use: OpenAI Codex (GPT-5) ran and analyzed the test; I reviewed the result.
Thank you!
@thehollowedone on GitHub · 2026-11-25 11:32 UTC · original
Independent Windows run on f906266. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11, debug.
cargo build --offline --locked --workspacepassed.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocapturereported 1,154 passed, 0 failed, 46 ignored, with 25 runtime skip notices included in Cargo's pass count. The stock i64 GPU test passed.A separate Direct DXIL fixture loaded both operands at runtime. Across 32 lanes it checked all four signed and unsigned min/max operations, including signed extrema, equal values, and low-word ordering when the high words were equal. DXC validated the shader. Disassembly showed four i64 compare/select pairs and zero i64 min/max intrinsic calls. All 128 full-width GPU results matched Rust. The original intrinsic path also validated and matched all 128 results on the RTX, with four intrinsic calls in its disassembly.
cargo test --offline --locked -p xcl --lib scratch_i64_min_max_variable_operands -- --nocapture --test-threads=1passed 1/0/0 with zero skips in each arm. This establishes NVIDIA regression coverage. The older AMD driver behavior and retail were outside this check. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the fixture, ran the tests, and drafted this report.@thiagocalile on GitHub · 2026-11-25 19:35 UTC · original
Independent Windows AMD Radeon RX 6600 (RDNA2, 8 GB VRAM, native wave64) verification of
main2898511+#1946(f906266) +#2192(1d8341a): all 1,364 workspace tests pass with 0 failures (down from 1 failure,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, on unmodifiedmain2898511).Tested
32.0.21045.29003,XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.main(2898511af1c038a2ef809719e9b6f89e5675c422):XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 1,362 passed, 1 failed, 46 ignored (11skipped; failed:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1).#1946(f906266) +#2192(1d8341a) ontomain2898511:XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 1,364 passed, 0 failed, 46 ignored (11skipped).Regression run (
scripts/smoke.ps1 -Seconds 60, release builds,XCL_ADAPTER=radeon)main(2898511):main2898511+#1946(f906266) +#2192(1d8341a):Not tested:
#1946and#2192individually in isolation, NVIDIA/Intel GPUs, Linux/RADV, or world load past the 60 s smoke window.AI use: Antigravity (Gemini 4 Neon) ran the merge, workspace tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.
@cindertheblue on GitHub · 2026-11-25 23:04 UTC · original
Same-base full-suite runs of the rebased head
71acf1fagainstmain6d12f58on two AMD GPUs, as asked in the review. No device loss in any run, and the PR adds no failure. On the iGPU it removes the one failuremainhas (seed 783).Tested
gfx1036), driver 32.0.21045.5002, on the same machine. Windows 11 Home 26200.9974, rustc 1.99.1, DXC 1.8.2502.11 (SDK 10.0.26100), debug. Each tree in its own folder and Cargo target,cargo build --workspacefirst, no local changes.cargo test --workspace --no-fail-fast -- --test-threads=4, once each:main6d12f58XCL_DIRECT_DXIL=1XCL_DIRECT_DXIL=1fuzz_validate_and_gpu_1stops atseed 722on the RX 7600 XT on both trees (#2192). On the iGPU it stops atseed 783: res[64] ..., CPU 0x7fffffffonmainand passes with this PR.XCL_DIRECT_DXIL=1,offline_compute_pipeline_is_reused_by_a_second_process(#1674) fails on both trees and both GPUs.XCL_DIRECT_DXIL=1run of this PR also faileda_dispatch_with_a_pipeline_still_building_waits_at_the_submitonce (left: 37, right: 421). Run alone 20 times withXCL_DIRECT_DXIL=1on each GPU and each tree, it passed 80 of 80, so I read it as a timing flake under the full-suite load, not this change.0x887A0005or device-removed lines in any of the eight logs. The same 8SKIPPEDlines in all eight.debug_seed,FUZZ_SEED=783, with and withoutXCL_DIRECT_DXIL=1: 32 mismatching onmainand 0 with this PR, on both GPUs.int64_bit_ops_match_cpuwithXCL_REQUIRE_GPU=1 XCL_DIRECT_DXIL=1: passes 3 of 3 on each GPU, and all 24ops_testspass on each. With onlyops.rsrestored from6d12f58it also passes on both, so these drivers don't have the RX 6800M pipeline-creation failure, and the test can't tell the two lowerings apart here.Not tested: a release build, a title or smoke run, the RX 6800M driver
30.0.13002.13003, NVIDIA.AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment from their output.
@upipibi on GitHub · 2026-11-26 06:00 UTC · original
NVIDIA test report for
71acf1f: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4(thehle::xaudio2tests hang on this machine, onmaintoo): this PR: 1289 passed, 0 failed, 26 ignored; 25 SKIPPED lines (21 no-wave64, 3 f16 per-lane-form refusals under #1426, 1 driver cache).gpu::dxil::ops_tests::int64_bit_ops_match_cpu,--test-threads=1 --nocapture, 3 runs each:XCL_DIRECT_DXIL=03/3 passed,XCL_DIRECT_DXIL=13/3 passed, 0 SKIPPED.gpu::dxil::ops_tests::once: 24 passed, 0 failed.Lib tests only; no title run.
AI-assisted (Claude Code, Claude Opus 5.5).
@bmjask on GitHub · 2026-11-25 21:31 UTC · original · reviewed
No concrete source-level defect found. Signed/unsigned compare predicates and strict-select semantics are correct, Int64Ops is retained, and the path avoids AMD-problematic binary i64 min/max; focused lane/half tests are good. Current head lacks visible Windows build/test and description reports device-loss cascades in full-suite run without same-base comparison. Refresh full GPU/Windows evidence after investigation; equality cases would be a minor additional guard.
@DavidM1911 on GitHub · 2026-11-26 06:51 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
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.