Repository navigation
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
3b26f10 to
2276a44
Compare
…ormity check A spanned module is checked for barriers inside control flow that a per-invocation value decides, and falls back to two lanes per invocation when it has one, so the spanned layout no longer needs APS5_SPANNED_WAVE; APS5_NO_SPANNED_WAVE turns it off.
…t can be narrower than 32 On a device whose compute subgroups can be narrower than 32 lanes, a spanned wave numbers its lanes by LocalInvocationIndex and shuffles within a half through workgroup memory, so its pipeline asks for full subgroups of any size and the driver picks the width.
|
Runs on NVIDIA and AMD (the "Not tested" list), plus two problems that block a merge onto current main. 1. Serialization version 38 is already taken on main. A version-38 request that current main writes has no trailing 2. The neighbouring 3. Runs. Windows 11 26300, MinGW GCC 15.2 Release, on the PR's own base: #7922 head
All of these also fail on current main on this machine. Forced path. Neither GPU reaches the new code by itself, and lavapipe doesn't either: its Not measured: frame time or GPU time. The perf claim is Intel-only, and NVIDIA and AMD modules don't change by the rule above. AI-assisted: yes (Claude Code); results above were run on this machine. |
What
#7922 spans a single-wave wave64 compute program over full 32-lane host subgroups, pinned with a required subgroup size of 32. On Intel that pin forces SIMD32, where every 32-bit value takes twice the registers of SIMD16.
Stray's (PPSA02101) dominant compute program
0x2011300000is about 80% of the GPU time of a frame once it spans. ANV reports it as 81,332 instructions with 1,095 spills, 6,959 fills and 420 live registers at the peak.On a device whose compute subgroups can be narrower than 32 lanes (
minSubgroupSize < 32), a spanned wave now leaves the width to the driver:LocalInvocationIndex, which is the guest lane because a spanned module declares a 64×1×1 workgroup. It wasSubgroupId * 32 + SubgroupLocalInvocationId.EmitSubgroupShuffleInHalf) goes through thewave_exchangeslots that full-wave shuffles already use. The barriers it adds are covered by perf(shader): span single-wave wave64 compute by default after a uniformity check #7922's uniformity check. Ballots, full-wave shuffles and the LDS lock loop were already independent of the host subgroup width.SpirvEmitInfo::anySubgroupSizegives the artifact a host subgroup size of 0, socomputeSubgroupSizerequests no size and the pipeline is created withREQUIRE_FULL_SUBGROUPS | ALLOW_VARYING_SUBGROUP_SIZE. A 64-lane workgroup is a multiple of everymaxSubgroupSize. Compute pipeline captures accept that pair of flags without a required size, and replay checkscomputeFullSubgroupsfor it.VulkanDevicesets the newSpirvTarget::spannedAnySubgrouponly where spanning is on andminSubgroupSize < 32. NVIDIA (32 only) and AMD (32 or 64) keep the pinned 32-lane layout, where the in-half shuffle stays a subgroup shuffle. The flag is part of the cache key and of the serialized request, as version 38.Tested
Intel Arc (Meteor Lake), Mesa 26.2.4 ANV, Fedora 44, Linux 7.2.10, GCC 16.2.1, Release.
Shader statistics.
APS5_PIPELINE_STATS=1on Stray: the largest compute executables now compile at SIMD8 or SIMD16 with no spills:0x2011300000takes about 29 ms per dispatch inAPS5_PROFILE_GPU, against about 100 ms with perf(shader): span single-wave wave64 compute by default after a uniformity check #7922 alone.ctestonmain04078b107+ perf(shader): span single-wave wave64 compute by default after a uniformity check #7922 + this PR:request_serializerandagc_shader_memorycover version 38, a version 37 request read without the flag, and the cache key.agc_compute_pipeline_capturecovers the new flag pair and rejects it with a required size.agc_driver_lds_mask_waterfallpasses.main7a015c094:spanned_uniformity,request_serializer,agc_shader_memory,agc_shader_disk_cache,agc_compute_pipeline_captureandagc_driver_lds_mask_waterfallpass on the Arc.Stray, frames 20 to 50 of the boot (
APS5_TRACE_FRAMES=20:30, 3840x2160). The builds are perf(shader): span single-wave wave64 compute by default after a uniformity check #7922 + fix(shader): keep host interpolation across entry EXEC copies #7811, against perf(shader): span single-wave wave64 compute by default after a uniformity check #7922 + this PR + fix(shader): keep host interpolation across entry EXEC copies #7811; Stray needs fix(shader): keep host interpolation across entry EXEC copies #7811 to start (AGC: since #6291, Stray (PPSA02101) stops on Intel Arc with "a pixel shader that reads barycentrics … needs a vertex shader before it" on a Geometry-path draw #7693). Three interleaved rounds after one warm run each, every capture started below 55 °C:That is −41% GPU time and −19% frame time. Against
main+ #7811 in #7922's runs (303.4 ms GPU, 449.3 ms p50), the two PRs together are −66% and −37%.trace_digest.py, first capture of each:aps5-summary.jsonllines, #7922 + #7811:{"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10402.197},"presents":30,"frame_ms":{"p50":344.354,"p90":362.838,"p99":365.594,"max":365.594},"gpu_busy_ms_per_present":178.992,"worker_busy_pct":{"queue worker 0x0":95.230,"queue worker 0x20":96.701},"top_phases_ms_per_frame":{"Driver.Packet":662.800,"Driver.Packet.memory_wait":311.063,"Driver.Packet.device_lock":196.200,"Graphics.Draw":118.353,"Graphics.Draw.draw_and_resource_release":117.932,"Recorder.Submit":110.774,"Driver.Packet.dispatch":72.540,"Driver.Dispatch":66.705},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1108566.json.gz"} {"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10438.627},"presents":30,"frame_ms":{"p50":347.138,"p90":357.715,"p99":395.051,"max":395.051},"gpu_busy_ms_per_present":176.764,"worker_busy_pct":{"queue worker 0x0":95.368,"queue worker 0x20":97.001},"top_phases_ms_per_frame":{"Driver.Packet":665.606,"Driver.Packet.memory_wait":310.399,"Driver.Packet.device_lock":200.406,"Graphics.Draw":120.733,"Graphics.Draw.draw_and_resource_release":120.266,"Recorder.Submit":110.327,"Driver.Packet.dispatch":74.144,"Driver.Dispatch":69.392},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1111466.json.gz"} {"commit":"128b8c1f83c0","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":10396.704},"presents":30,"frame_ms":{"p50":346.716,"p90":358.377,"p99":366.846,"max":366.846},"gpu_busy_ms_per_present":175.747,"worker_busy_pct":{"queue worker 0x0":95.259,"queue worker 0x20":96.709},"top_phases_ms_per_frame":{"Driver.Packet":662.152,"Driver.Packet.memory_wait":304.406,"Driver.Packet.device_lock":200.733,"Graphics.Draw":117.667,"Graphics.Draw.draw_and_resource_release":117.215,"Recorder.Submit":112.674,"Driver.Packet.dispatch":78.631,"Driver.Dispatch":74.962},"trace_dropped":false,"trace":"aps5-trace-128b8c1f83c0-1113851.json.gz"}#7922 + this PR + #7811:
{"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8502.341},"presents":30,"frame_ms":{"p50":284.666,"p90":293.569,"p99":301.329,"max":301.329},"gpu_busy_ms_per_present":99.842,"worker_busy_pct":{"queue worker 0x0":95.453,"queue worker 0x20":96.606},"top_phases_ms_per_frame":{"Driver.Packet":541.345,"Driver.Packet.memory_wait":242.369,"Driver.Packet.device_lock":172.983,"Graphics.Draw":109.737,"Graphics.Draw.draw_and_resource_release":109.328,"Recorder.Submit":86.761,"Driver.Packet.dispatch":77.395,"Driver.Dispatch":59.959},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1110129.json.gz"} {"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8295.347},"presents":30,"frame_ms":{"p50":275.827,"p90":287.420,"p99":298.300,"max":298.300},"gpu_busy_ms_per_present":103.936,"worker_busy_pct":{"queue worker 0x0":95.021,"queue worker 0x20":96.792},"top_phases_ms_per_frame":{"Driver.Packet":526.752,"Driver.Packet.memory_wait":230.941,"Driver.Packet.device_lock":175.752,"Graphics.Draw":109.682,"Graphics.Draw.draw_and_resource_release":109.304,"Recorder.Submit":84.958,"Driver.Packet.dispatch":77.214,"Driver.Dispatch":56.640},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1112745.json.gz"} {"commit":"3c286f2aaa91","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"absent","APS5_TRACE_FRAMES":"20:30"},"gpu":"Intel(R) Arc(tm) Graphics (MTL)","driver":"Intel open-source Mesa driver Mesa 26.2.4","os":"Linux 7.2.10-200.fc44.x86_64","resolution":"3840x2160","window":{"spec":"frames 20:30","first_present":20,"ms":8485.135},"presents":30,"frame_ms":{"p50":282.685,"p90":298.537,"p99":299.527,"max":299.527},"gpu_busy_ms_per_present":107.481,"worker_busy_pct":{"queue worker 0x0":94.914,"queue worker 0x20":97.470},"top_phases_ms_per_frame":{"Driver.Packet":540.337,"Driver.Packet.memory_wait":237.203,"Driver.Packet.device_lock":173.253,"Graphics.Draw":109.525,"Graphics.Draw.draw_and_resource_release":109.133,"Recorder.Submit":88.988,"Driver.Packet.dispatch":82.072,"Driver.Dispatch":62.017},"trace_dropped":false,"trace":"aps5-trace-3c286f2aaa91-1115056.json.gz"}Traces, digests and summaries:
ThatsLeo:evidence/spanned-any-subgroup.Not tested:
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)