Repository navigation
Conversation
added 4 commits
November 24, 2026 15:57
…duccion min en onda parcial) Nuevo test que dibuja un triangulo pequeno (3 quads = 6 pixeles, onda parcial) y reduce V_MIN_U32 sobre los pixeles impares. Reproduce el bug: las lanes no lanzadas se leen como 0 en vez de la identidad -1, y el min devuelve 0 en vez del minimo real (2).
…veActive* La reduccion de onda (seed v_cndmask_b32 + DPP8 xor 1/2/4 + DPP16 row_mirror + v_permlanex16 + v_readlane 32/0) se reconoce en translate() y el seed se reduce con WaveActiveMin/Max/BitOr sobre las lanes lanzadas; los pasos DPP/readlane se suprimen (leian las lanes no lanzadas como 0 en vez de la identidad, rompiendo min). Antes: gpu_wave64_ps_partial_wave_min daba min=0 (want 2.0). Despues: da 2.0. Regresion: gpu_wave64_ps_whole_wave_reductions, gpu_wave64_ps_spill_slots y 104 tests GPU pasan.
…s (v_readlane 32 + op) El reconocedor ahora suprime solo la reduccion dentro de cada mitad (3x DPP8 + DPP16 + v_permlanex16 + op) y CONSERVA v_readlane lane32 + op + v_readlane lane0, que combinan las dos mitades wave32 en la reduccion wave64 global. Antes (skip de 8) suprimia el readlane32 y la reduccion quedaba por-mitad (WaveActive* solo cubre la wave fisica de 32 lanes). Regresion: gpu_wave64_ps_partial_wave_min, gpu_wave64_ps_whole_wave_reductions, gpu_wave64_ps_spill_slots y 104 tests GPU pasan.
…/2/4, DPP16 row_mirror y lanes de readlane 32/0 Los campos DPP se leen de la codificacion de extension (emit::ext_encoding), no de d.enc. Ahora el reconocedor solo acepta la secuencia exacta de reduccion de onda (DPP8 xor 1/2/4, DPP16 row_mirror ctrl 0x140, v_readlane lane 32 y 0), reduciendo falsos positivos (riesgos A/B).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Fixes the whole-wave
v_min_u32reduction returning 0 (instead of the true minimum) when the rasterizer launches only part of a wave, on GPUs with 32-lane waves (and in any partial wave). The reduction idiom is now recognised andWaveActiveMin/WaveActiveMax/WaveActiveBitOris emitted over the launched lanes; the DPP / permlane / readlane steps are suppressed (they read unlaunched lanes as 0 instead of the identity).gpu_wave64_ps_partial_wave_min(synthetic, no game data).wave64-partial-min-test. Commits:cecfa49(test) →ae53d84(fix).Before / after (RTX 5070 Ti, DXC 1.9.2602.17)
min=0(want2.0) → FAILED.min=2.0→ PASS.Tests
gpu_wave64_ps_partial_wave_min: PASSgpu_wave64_ps_whole_wave_reductions: PASSgpu_wave64_ps_spill_slots: PASSgpu_wave64_vs_spill_slots_and_identity: PASScargo test -p xcl --lib gpu_): 104 passed, 0 failed, 1 ignored.Files
crates/xcl/src/gpu/recomp/emit.rs(+15)crates/xcl/src/gpu/recomp/mod.rs(+142)Limitations / risks
v_cndmask_b32+ 3× DPP8 xor 1/2/4 + DPP16 row_mirror +v_permlanex16+v_readlane32/0). A program using the same instruction sequence for a different purpose would be mis-recognised; not observed in the corpus.WaveActive*operates over the launched lanes of the physical wave; the split wave64→2×wave32 exchange is unchanged.License
GPL-2.0-only (unchanged).
Mirror of xcl-dev#1857 (auto-synced, do not edit).