FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
fused_block.h File Reference

Fused compress for the block-local "predict+quant+fixed-rate-coder" family (cuSZp2 and cuSZp3). More...

#include "backend/types.h"
#include <cstddef>
#include <cstdint>

Go to the source code of this file.

Namespaces

namespace  fz
 

Functions

size_t fz::fused::launchFusedCuszp2Compress (const float *d_in, size_t n, float abs_eb, uint32_t block_size, bool outlier, uint8_t *d_out, MemoryPool *pool, fz::stream_t stream)
 
size_t fz::fused::launchFusedCuszp3Compress (const float *d_in, size_t dx, size_t dy, float abs_eb, uint32_t tx, uint32_t ty, uint8_t *d_out, MemoryPool *pool, fz::stream_t stream)
 

Detailed Description

Fused compress for the block-local "predict+quant+fixed-rate-coder" family (cuSZp2 and cuSZp3).

Collapses Quantizer(linear,ABS) + a block-local predictor + AdaptiveBitpack (outlier) into per-warp work: one warp owns one block and runs quant + predictor delta + adaptive-bitpack in registers, so the int codes are never materialised to DRAM. The rate/pack kernels are the AdaptiveBitpack outlier warp kernels parameterised on ElemsPerLane (= block_size/32) and a predictor policy, so the two shapes share one code path. Measured 2-3x over the staged pipeline; see docs/codebase_notes.md CN-FUSE-PROOF / CN-FUSE-EXEC. The output archive is byte-identical to the staged AdaptiveBitpack output, so decode is unchanged.

Registry entries in the "predict+quant+fixedcoder" driver:

  • cuSZp2: Lorenzo(1-D, block=32) → launchFusedCuszp2Compress
  • cuSZp3: TiledLorenzo(2-D 8x8, block=64) → launchFusedCuszp3Compress Neither is graph-capturable — each synchronises to read back the archive length — so fusion disables graph mode.

Function Documentation

◆ launchFusedCuszp2Compress()

size_t fz::fused::launchFusedCuszp2Compress ( const float *  d_in,
size_t  n,
float  abs_eb,
uint32_t  block_size,
bool  outlier,
uint8_t *  d_out,
MemoryPool pool,
fz::stream_t  stream 
)

Run the fused cuSZp2 compress.

Parameters
d_indevice float input (n elements)
nelement count
abs_ebabsolute error bound (2*eb reconstruction spacing)
block_size32 only, for now
outlierper-block outlier selection (true for cuSZp2)
d_outdevice archive buffer (>= worst-case AdaptiveBitpack size)
poolpool for look-back scratch (cost/offset/CUB temp)
streamCUDA stream (synchronised internally to read the length)
Returns
total archive length in bytes (meta region + packed payload)

◆ launchFusedCuszp3Compress()

size_t fz::fused::launchFusedCuszp3Compress ( const float *  d_in,
size_t  dx,
size_t  dy,
float  abs_eb,
uint32_t  tx,
uint32_t  ty,
uint8_t *  d_out,
MemoryPool pool,
fz::stream_t  stream 
)

Run the fused cuSZp3 compress (linear-ABS quant + 2-D separable tiled Lorenzo + outlier AdaptiveBitpack with block == tile_elems). Only the 8x8 (tile_elems == 64), 2-D shape is supported; other shapes return 0 so the caller falls back to the staged path. The archive is byte-identical to the staged cuSZp3 output.

Parameters
d_indevice float field (dx*dy elements, row-major, x fastest)
dx,dyfield dimensions (tz == 1)
abs_ebabsolute error bound
tx,tytile extents (tx*ty must be 64)
d_outdevice archive buffer
poolscratch pool (cost/offset/CUB temp)
streamCUDA stream (synchronised internally to read the length)
Returns
total archive length in bytes (meta region + packed payload)