FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
fz::FusedOpDecl Struct Reference

A stage's contribution to a generated fused kernel — the device-op it maps to, where its source lives, and its runtime parameter bytes. More...

#include <fusion.h>

Public Attributes

std::string op_name
 device-op type name, e.g. "DiffNegabinary"
 
std::string include_header
 header used by the generated source
 
std::vector< uint8_t > params
 POD Params bytes; empty for stateless ops.
 
uint32_t elems_per_lane = 0
 

Detailed Description

A stage's contribution to a generated fused kernel — the device-op it maps to, where its source lives, and its runtime parameter bytes.

The generic runner collects one FusedOpDecl per stage in a fused group (after priming), packs the params blobs in group order, and hands the ordered op-name list to the codegen. This is how a stage declares its fused identity without the runner hard-coding any pipeline shape. Default-constructed (empty op_name) means "not a fused op" — the stage does not participate.

params is the raw bytes of the op's POD Params struct; the generated kernel reinterpret_casts the packed blob to that type, so the host-packed layout MUST match the device struct exactly (share the POD definition — see modules/fused/chunk_fusion/chunk_op_params.h). Stateless ops leave it empty.

Member Data Documentation

◆ elems_per_lane

uint32_t fz::FusedOpDecl::elems_per_lane = 0

Warp-register predictors only (0/unused otherwise): the shape a generic warp runner needs so it does not have to downcast the predictor stage. The kernel is templated on elems_per_lane (= block_size/32), and the blocks cover n_ab padded elements. The predictor packs its config into params with a leading float inv2eb slot (offset 0) the runner fills from the resolved bound.