|
| void | setInverse (bool inv) override |
| |
| bool | isGraphCompatible () const override |
| |
| size_t | getRequiredInputAlignment () const override |
| |
| FusionSpec | getFusionSpec () const override |
| |
|
FusedOpDecl | getFusedOp () const override |
| | Chunk-cooperative coder op (the swappable variable-length sink). Stateless.
|
| |
|
void | setFusedArchiveResult (size_t archive_bytes, size_t orig_bytes) override |
| | Base-class tail hook → the existing coder result setter (archive, orig).
|
| |
| void | setFusedResult (size_t archive_bytes, size_t orig_bytes) |
| |
| void | execute (fz::stream_t stream, MemoryPool *pool, const std::vector< void * > &inputs, const std::vector< void * > &outputs, const std::vector< size_t > &sizes) override |
| |
| void | postStreamSync (fz::stream_t stream) override |
| |
| std::string | getName () const override |
| |
| std::vector< size_t > | estimateOutputSizes (const std::vector< size_t > &input_sizes) const override |
| |
| std::unordered_map< std::string, size_t > | getActualOutputSizesByName () const override |
| |
| size_t | getActualOutputSize (int index) const override |
| |
| size_t | estimateScratchBytes (const std::vector< size_t > &input_sizes) const override |
| |
| uint16_t | getStageTypeId () const override |
| |
| uint8_t | getOutputDataType (size_t) const override |
| |
| size_t | serializeHeader (size_t output_index, uint8_t *buf, size_t max_size) const override |
| |
| void | deserializeHeader (const uint8_t *buf, size_t size) override |
| |
| size_t | getMaxHeaderSize (size_t) const override |
| |
| void | saveState () override |
| |
| virtual std::vector< std::string > | getOutputNames () const |
| |
| int | getOutputIndex (const std::string &name) const |
| |
| virtual uint8_t | getInputDataType (size_t) const |
| |
| virtual std::vector< std::string > | getRunNotes () const |
| |
| virtual void | setDims (const std::array< size_t, 3 > &dims) |
| |
| virtual void | onFinalize (size_t, MemoryPool *) |
| |
| virtual size_t | estimateDeviceFootprintBytes (size_t) const |
| |
| virtual size_t | estimatePinnedFootprintBytes (size_t) const |
| |
| virtual void | setTerminalOutput (bool terminal) |
| |
| virtual EncodingOracleDecl | getEncodingOracle () const |
| |
| virtual bool | bindDownstreamEncodingOracle (const EncodingOracleDecl &) |
| |
| virtual std::vector< FusedAuxOutputDecl > | getFusedAuxOutputs () const |
| |
| virtual void | primeFusedForwardState (const FusedPrimeContext &) |
| |
| virtual void | setFusedSideOutput (int, size_t) |
| |
LC RRE repeated-word bitmap reducer.
setChunkSize(bytes) — chunk size (default 16384; only 16384 is supported). setWordSize(bytes) — word granularity 1/2/4/8 (default 1).
- Note
- Prior work: GPU kernels are a faithful port of
d_RRE.h and d_repetition_elimination.h from the LC framework (Burtscher et al., BSD-3-Clause). See THIRD_PARTY.md and modules/coders/lc_common/lc_chunk_components.cuh.
-
CUDA Graph capture is supported for compression only. The inverse path reads the stream header with blocking D2H copies before it can launch the decode kernel (same constraint as RZEStage).
Fusion contract: how this stage accesses its input, which decides whether the fusion planner may fold it into a single kernel with its neighbours (see include/stage/fusion.h and docs/codebase_notes.md CN-FUSE-PROOF).
Default is Unfusable — a stage is only ever fused if it opts in by overriding this. Stages whose fusability depends on configuration (e.g. a quantizer is a pure Map only in linear mode) must reflect that here. Forward-mode only; an inverse stage should report Unfusable.
Reimplemented from fz::Stage.
| void fz::RREStage::execute |
( |
fz::stream_t |
stream, |
|
|
MemoryPool * |
pool, |
|
|
const std::vector< void * > & |
inputs, |
|
|
const std::vector< void * > & |
outputs, |
|
|
const std::vector< size_t > & |
sizes |
|
) |
| |
|
overridevirtual |
Execute the stage. Inputs, outputs, and sizes are device pointers/bytes.
Stages may call cudaStreamSynchronize(stream) or issue blocking D2H copies when the algorithm requires it (e.g. Huffman histogram readback for codebook construction, ANS renormalization tables). Such stages must return false from isGraphCompatible() and must document the sync points.
Note: the DAG dispatches sibling nodes (same topological level) via a sequential CPU loop, each enqueuing to its own stream. A sync inside execute() blocks the CPU from dispatching subsequent siblings until the synced stream is idle — this delays parallel branches in wide DAGs. In a linear pipeline there are no siblings and no extra cost.
Implements fz::Stage.