Add the SIMD table generator script#858
Open
terrelln wants to merge 8 commits into
Open
Conversation
Differential Revision: D109877948
Differential Revision: D109877947
Summary: Adds byte-aligned bit reservation and pop primitives to the FF bitstream, needed by the upcoming PivCo-Huffman kernels: - `ZS_BitCStreamFF_reserveAlignedBits` / `ZS_BitCStreamFF_commitReservedBits` on the write side. - `ZS_BitDStreamFF_popAlignedBits` on the read side, plus a `begin` cursor in `ZS_BitDStreamFF` so the reader can compute byte offsets. - `ZS_BitDStreamFF_finish` now returns the number of bytes consumed. - Hardens `ZS_BitCStreamFF_init`/`_finish`/`_flush` against small buffers by avoiding pointer arithmetic that could underflow. Differential Revision: D109878843
Summary:
Introduces the architecture-specific kernel interface for the PivCo-Huffman codec along with a portable, correctness-oriented generic implementation and the kernel test suite.
- `arch/common_pivco_arch.h`: shared `ZL_PIVCO_HUFFMAN_SLOP` contract.
- `arch/{encode,decode}_pivco_arch.h`: the `ZL_PivCoHuffmanEncode` / `ZL_PivCoHuffmanDecode` function-pointer tables and the `_select()` dispatchers.
- `arch/{encode,decode}_pivco_arch.c`: the portable `_generic` implementation of every kernel (partition/pack on encode, merge/flat-depth on decode). `_select()` currently returns `_generic`; the SIMD kernels register themselves in later commits.
- `test_pivco_huffman.cpp`: the `PivCoHuffmanArchTest` suite that checks every supported kernel against an independent reference, parameterized over the registered architectures.
Differential Revision: D109878842
Summary: Adds `micro_pivco_huffman.cpp` and wires it into the micro benchmark harness (`micro_bench.{cpp,h}`) to measure the PivCo-Huffman encode/decode kernels.
Differential Revision: D110077474
Summary:
Implements the PivCo-Huffman kernel on top of the architecture kernel interface.
- `common_pivco_kernel.{h,c}`: the shared coding tree (`ZL_PivCoHuffmanTree`), `ZL_PivCoHuffman_computeTableLog`, rank/split helpers, and the block-size constants shared by both directions.
- `encode_pivco_kernel.{h,c}`: `ZL_PivCoHuffman_encode` plus its scratch/bound sizing.
- `decode_pivco_kernel.{h,c}`: `ZL_PivCoHuffman_decode` plus its scratch sizing.
- `test_pivco_huffman.cpp`: the `PivCoHuffmanKernelTest` cases exercising round-trips, multi-block and custom block sizes, tree construction, and corruption rejection through the kernel interface.
Differential Revision: D109882916
Summary:
Binds the PivCo-Huffman kernel into OpenZL as a real codec and registers it.
- `{encode,decode}_pivco_binding.{h,c}` and `graph_pivco_huffman.h`: the encoder/decoder transform bindings and the codec's graph definition.
- `zl_pivco_huffman.h` / `PivCoHuffman.hpp` / `Codecs.hpp`: the public C and C++ codec API.
- `zl_graphs.h`, `zl_public_nodes.h`, `private_nodes.h`, `wire_format.h`, `{encoder,decoder}_registry.c`, `graph_registry.c`: register the new node/graph and assign its wire-format id.
- `spec.md`: the on-wire format specification.
- `tests/registry/components/PivCoHuffman.cpp` and `OpenZLComponents.h`: integration coverage in the component registry.
Differential Revision: D109893484
Summary: Adds `scripts/gen_pivco_huffman_tables.py`, which renders the generated lookup-table headers consumed by the architecture-specific kernels (x86, neon, avx512). It is checked in ahead of the per-architecture kernels that include its output. Differential Revision: D109893569
|
@terrelln has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109893569. |
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: Adds
scripts/gen_pivco_huffman_tables.py, which renders the generated lookup-table headers consumed by the architecture-specific kernels (x86, neon, avx512). It is checked in ahead of the per-architecture kernels that include its output.Differential Revision: D109893569