fix: resolve LzSeqR parallel encode routing bug#120
Merged
ChrisLundquist merged 1 commit intomasterfrom Mar 11, 2026
Merged
Conversation
The parallel scheduler routed LzSeqR stage 1 (entropy) to stage_rans_encode_webgpu which uses a chunked-payload wire format incompatible with the standard rANS decoder. Single-block and single-thread paths used stage_rans_encode_with_options (CPU rANS) correctly. Fixed by removing the GPU routing for LzSeqR entropy, matching the consistent CPU path. Removed the now-dead stage_rans_encode_webgpu function. Added test_gpu_rans_interleaved_decode_lzseqr_6stream to catch regressions. Updated TODO docs with investigation findings and Criterion benchmark data for Lzfi vs LzssR comparison. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ChrisLundquist
added a commit
that referenced
this pull request
Mar 12, 2026
Add architecture section documenting the unified token pipeline (PR #118), active/removed pipelines table, and Silesia corpus benchmark data. Update project layout to reflect lz_token.rs and removed modules. Update dead ends with streaming path bottleneck finding and LzSeqR routing bug (PR #120). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
ChrisLundquist
added a commit
that referenced
this pull request
Mar 12, 2026
* bench: enable parallel, large, and webgpu benchmarks for Lzfi Lzfi was only benchmarked on the small Canterbury corpus with no parallel, large-file, or WebGPU variants. Enable all modes to match the LzSeqR and Lzf benchmark coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update CLAUDE.md with architecture overview and Silesia benchmarks Add architecture section documenting the unified token pipeline (PR #118), active/removed pipelines table, and Silesia corpus benchmark data. Update project layout to reflect lz_token.rs and removed modules. Update dead ends with streaming path bottleneck finding and LzSeqR routing bug (PR #120). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
stage_rans_encode_webgpuwhich uses a chunked-payload wire format incompatible with the standard rANS decoder. The single-block and single-thread paths correctly usedstage_rans_encode_with_options(CPU rANS). This causedInvalidInputerrors when compressing with LzSeqR + WebGpu backend + threads > 1.stage_rans_encode_webgpu: No callers remain after the fix. GPU rANS entropy is known to be slower than CPU (0.54-0.77x), so re-enabling is low priority.test_gpu_rans_interleaved_decode_lzseqr_6streamverifies LzSeqR round-trips correctly with GPU backend and multi-threading.Test plan
test_gpu_rans_interleaved_decode_lzseqr_6streampassestest_gpu_rans_interleaved_decode_round_trip(LzssR) still passes🤖 Generated with Claude Code