Tiling: use fixed-width copies for short runs of wide elements #1728
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1738"
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 ivall/xcl. Originally posted by bradyyie on 2026-11-24T20:04:36Z.
Stacked on #1512 (part of #1511). Only
59bc9eeis new. For an 8- or 16-byte element, a short contiguous run can be just one or two elements. At those widths, a fixed-size copy per element beat the variable-size run loop.What is in it
tiling.rs: specialize 8-byte elements for runs of one or two and 16-byte elements for runs of one. Longer runs keep #1512's copy path.Tested
20:A, stock pacing. In profile seconds 65–75, game-host stacks containingdetile_levelaccounted for 19.48% of sampled thread CPU delta on #1512 (fddfa26), 12.30% here. Asset traffic differed between runs. The earlier PIX timing capture identified the streaming interval; the CPU comparison is from samply.cargo test --release --workspace --locked -- --test-threads=4: 752 passed, 0 failed, 41 ignored. Two GPU tests reportedSKIPPED(no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Regression run
Not tested
AI use
OpenCode, GPT-6.2 Astra: implementation, benchmarks, test runs and PR text.
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:15:45Z.
Full-suite run, since this PR has no test report yet. Tested exact head
59bc9ee(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.detile_level_runs_match_elements.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored, no skips.--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:44:03Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:04:12Z.
PR #1738 — Windows / Arc A770 verification
Tested clean detached head
59bc9eebdac509181118ac5bd7f281a832d0ddf9. The diff changes onlycrates/xcl/src/gpu/tiling.rs.STOR-WINLAB | Windows 11 Enterprise Evaluation x64, build 26200 | AMD Ryzen 7 3800X | Intel Arc A770, driver 32.0.101.9175 | DXC 1.9.2609.5 | rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Cargo used unoptimized dev and test profiles with debug info and incremental compilation disabled.
Tested
cargo build --workspaceandcargo test --workspace --no-runboth exited 0 outside the Arc lock. Cargo built 18 test executables.XCL_ADAPTER=NONE_CPU_ONLY,cargo test -p xcl --lib gpu::tiling::tests::outside the lock gave 15 passed, 0 failed, 0 ignored, and 0SKIPPEDlines. The detile tests compare output bytes to element-by-element reads across supported swizzles, 1–16-byte elements (including the fixed-width 8- and 16-byte cases), pipe configurations, mip levels and tails. They exercise full and truncated sources, zero-fill for unreadable elements, and base swizzle offsets.Invoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1,cargo test --workspace --no-fail-fast -- --test-threads=4exited 101. The 19 result lines (18 executables and 1 doc-test target) report 736 passed, 16 failed, 41 ignored, and 0 filtered out. All 15 tiling tests also passed in this run.Workspace failures and skips
CreateComputePipelineStateerrors (0x80070057) and 4 output mismatches (fused overflow, mip sampling, f16 high-half preservation, and a wave reduction). The synthetic title failed theRSSetDepthBiasXcheck, drawing blue where green was expected.SKIPPEDlines. Two cite missing wave64, one cites tiled resources tier below 2, and two cite missing D3D12 debug-layer support. These five appear in the harness pass count and supply no coverage.Not tested
Matched
mainbaseline, retail-title smoke run, retail samples (XCL_SAMPLE_*unset), performance, and other GPU vendors.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1738-suite.logand published.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:38:12Z.
Triage (#1607) – head
59bc9eeThe diff is #1512's change line for line:
Layout::run, the run loop indetile_leveland thedetile_level_runs_match_elementstest. On top of it, acopy_elements!fast path for 8 and 16 B elements.Main already has this:
95f12a0("process 2D texture tiling in contiguous block runs") addedLayout::run(up to 16 B runs, same alignment and swizzle conditions) anddetile_2d, which copies whole runs and falls back to elements for a truncated source; it covers tiling too. The branch conflicts with that code.Recommendation: close (superseded by main commit
95f12a0).AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:47:32Z.
Closing as superseded: this change is already on
main(95f12a04). main tiling.rs detiles/tiles 2D levels in contiguous runs (Layout::run up to 16 B, copy_runs:: for 1/2/4/8/16 B) with tests; independent and broader implementationTwo independent checks found this: Foniass's close list on #1607 and ours against current
main. If something here is still missing onmain, say so and reopen it, or ask and I will.AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.
Pull request closed