FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
compressor.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "backend/types.h"
8#include "advanced/dag.h"
10#include "pipeline/perf.h"
11#include "pipeline/config.h"
12#include "stage/stage.h"
13#include "stage/stage_factory.h"
14#include "mem/mempool.h"
15#include "fzm_format.h"
16
17#include <array>
18#include <memory>
19#include <stdexcept>
20#include <string>
21#include <unordered_map>
22#include <vector>
23
24namespace fz {
25
63enum class SpecializationPolicy { Off, Auto, Force };
64
68
71 std::string implementation;
72 std::vector<std::string> stages;
73 std::string execution_path;
74};
76
79 SpecializationPolicy policy = SpecializationPolicy::Off;
80 size_t legal_group_count = 0;
81 std::vector<SpecializationGroupInfo> installed_groups;
83 std::vector<SpecializationGroupInfo> installed_inverse_groups;
85 std::string fallback_reason;
86};
88
89class Pipeline {
90public:
96 explicit Pipeline(
97 size_t input_data_size = 0,
99 float pool_multiplier = 3.0f
100 );
101
109 explicit Pipeline(const std::string& config_path);
110
111 ~Pipeline();
112
113 // ── Configuration ─────────────────────────────────────────────────────────
114
116 void setMemoryStrategy(MemoryStrategy strategy);
117
119 void setSpecializationPolicy(SpecializationPolicy mode) { fusion_policy_ = mode; }
120 SpecializationPolicy getSpecializationPolicy() const { return fusion_policy_; }
122 size_t getSpecializedGroupCount() const { return dag_ ? dag_->getFusedGroupCount() : 0; }
124 const SpecializationInfo& getSpecializationInfo() const { return fusion_info_; }
125
127 void setFusionPolicy(SpecializationPolicy mode) { setSpecializationPolicy(mode); }
128 SpecializationPolicy getFusionPolicy() const { return getSpecializationPolicy(); }
129 size_t getFusedGroupCount() const { return getSpecializedGroupCount(); }
130 const SpecializationInfo& getFusionInfo() const { return fusion_info_; }
131
133 void setNumStreams(int num_streams);
134
141 void setDims(size_t x, size_t y = 1, size_t z = 1) { dims_ = {x, y, z}; }
142 void setDims(std::array<size_t, 3> dims) { dims_ = dims; }
143 std::array<size_t, 3> getDims() const { return dims_; }
144
145 // ── Builder API ───────────────────────────────────────────────────────────
146
151 template<typename StageT, typename... Args>
152 StageT* addStage(Args&&... args);
153
161 int connect(Stage* dependent, Stage* producer, const std::string& output_name = "output");
162
164 int connect(Stage* dependent, const std::vector<Stage*>& producers);
165
189 void bindExternalInput(Stage* stage);
190
196 void finalize();
197
203 void warmup(fz::stream_t stream = 0);
204
206 void setWarmupOnFinalize(bool enable) { warmup_on_finalize_ = enable; }
207 bool isWarmupOnFinalizeEnabled() const { return warmup_on_finalize_; }
208
215 void setPoolManagedDecompOutput(bool enable) { pool_managed_decomp_ = enable; }
216 bool isPoolManagedDecompOutput() const { return pool_managed_decomp_; }
217
247 void setPrimarySource(Stage* stage) { primary_source_stage_ = stage; }
248
262 size_t getMaxCompressedSize(size_t input_bytes) const;
263
276 size_t getLastUncompressedSize() const {
277 return original_input_size_ > 0 ? original_input_size_ : input_size_;
278 }
279
280 // ── Execution ─────────────────────────────────────────────────────────────
281
293 void compress(
294 const void* d_input,
295 size_t input_size,
296 void** d_output,
297 size_t* output_size,
298 fz::stream_t stream = 0
299 );
300
324 void compress(
325 const void* d_input,
326 size_t input_size,
327 void* d_output_buf,
328 size_t output_buf_capacity,
329 size_t* actual_output_size,
330 fz::stream_t stream = 0
331 );
332
347 void decompress(
348 const void* d_input,
349 size_t input_size,
350 void** d_output,
351 size_t* output_size,
352 fz::stream_t stream = 0
353 );
354
374 void decompress(
375 const void* d_input,
376 size_t input_size,
377 void* d_output_buf,
378 size_t output_buf_capacity,
379 size_t* actual_output_size,
380 fz::stream_t stream = 0
381 );
382
420 void decompressInto(
421 const void* d_input,
422 size_t input_size,
423 void* d_output_buf,
424 size_t output_buf_capacity,
425 size_t* actual_output_size,
426 fz::stream_t stream = 0
427 );
428
429 // ── Explicit-ownership execution API ──────────────────────────────────────
430 //
431 // Span-based wrappers over the pointer overloads above. Behavior is
432 // identical — these exist so ownership is visible in the signature instead
433 // of depending on `void**` vs `void*` and on setPoolManagedDecompOutput().
434 // Prefer these in new code; the pointer overloads remain supported.
435
441 BorrowedDeviceBuffer compress(ConstDeviceSpan input, fz::stream_t stream = 0);
442
447 size_t compressInto(ConstDeviceSpan input, DeviceSpan output, fz::stream_t stream = 0);
448
457 BorrowedDeviceBuffer decompressBorrowed(ConstDeviceSpan input, fz::stream_t stream = 0);
458
464 OwnedDeviceBuffer decompressOwned(ConstDeviceSpan input, fz::stream_t stream = 0);
465
471 size_t decompressInto(ConstDeviceSpan input, DeviceSpan output, fz::stream_t stream = 0);
472
479 size_t decompressIntoAsync(ConstDeviceSpan input, DeviceSpan output, fz::stream_t stream = 0);
480
512 void prepareInverse(size_t uncompressed_size);
513
515 void reset(fz::stream_t stream = 0);
516
517 // ── Profiling ─────────────────────────────────────────────────────────────
518
523 void enableProfiling(bool enable);
524 bool isProfilingEnabled() const { return profiling_enabled_; }
525
527 const PipelinePerfResult& getLastPerfResult() const { return last_perf_result_; }
528
530 CompressionDAG* getDAG() { return dag_.get(); }
531
533 size_t getPoolThreshold() const;
534
544 bool isMemPoolFallbackMode() const;
545
551 void enableBoundsCheck(bool enable) { dag_->enableBoundsCheck(enable); }
552 bool isBoundsCheckEnabled() const { return dag_->isBoundsCheckEnabled(); }
553
559 void setColoringEnabled(bool enable) {
560 coloring_enabled_ = enable; // survives a setMemoryStrategy() DAG swap
561 dag_->setColoringEnabled(enable);
562 }
563 bool isColoringEnabled() const { return dag_->isColoringEnabled(); }
564 size_t getColorRegionCount() const { return dag_->getColorRegionCount(); }
565
573 bool isColoringRequested() const { return coloring_enabled_; }
574
584 std::unordered_map<std::string, std::vector<std::string>> collectRunNotes() const {
585 std::unordered_map<std::string, std::vector<std::string>> notes;
586 for (const auto& s : stages_) {
587 if (!s) continue;
588 auto n = s->getRunNotes();
589 if (!n.empty()) notes.emplace(s->getName(), std::move(n));
590 }
591 return notes;
592 }
593
594 size_t getPeakMemoryUsage() const;
595 size_t getCurrentMemoryUsage() const;
596 void printPipeline() const;
597
598 // ── File Serialization ────────────────────────────────────────────────────
599
602 FZMHeaderCore core;
603 std::vector<FZMStageInfo> stages;
604 std::vector<FZMBufferEntry> buffers;
605 };
606
608 void writeToFile(const std::string& filename, fz::stream_t stream = 0);
609
611 static FZMFileHeader readHeader(const std::string& filename);
612
614 FZMFileHeader buildHeader() const;
615
616 // ── In-memory metadata header (decode without a prior compress) ────────────
617
632 std::vector<uint8_t> serializeHeaderToMemory() const;
633
653 void primeInverseFromHeader(const void* header_bytes, size_t header_size);
654
661 static std::unique_ptr<Pipeline> fromHeader(
662 const void* header_bytes, size_t header_size,
664 SpecializationPolicy policy = SpecializationPolicy::Off);
665
680 static void decompressFromFile(
681 const std::string& filename,
682 void** d_output,
683 size_t* output_size,
684 fz::stream_t stream = 0,
685 PipelinePerfResult* perf_out = nullptr,
686 size_t pool_override_bytes = 0
687 );
688
706 void decompressFromFileInstance(
707 const std::string& filename,
708 void** d_output,
709 size_t* output_size,
710 fz::stream_t stream = 0,
711 PipelinePerfResult* perf_out = nullptr
712 );
713
738 void decompressFromMemory(
739 const void* header_bytes,
740 size_t header_size,
741 const void* d_blob,
742 size_t blob_size,
743 void** d_output,
744 size_t* output_size,
745 fz::stream_t stream = 0
746 );
747
748 // ── Config File ───────────────────────────────────────────────────────────
749
763 void loadConfig(const std::string& path);
764
773 void saveConfig(const std::string& path) const;
774
775private:
776 // ── RAII buffer wrappers (private implementation detail) ─────────────────
777
778 // Pool-allocated persistent device buffer.
779 struct PoolBuffer {
780 void* ptr = nullptr;
781 size_t capacity = 0;
782 MemoryPool* pool = nullptr;
783
784 ~PoolBuffer() { free(0); }
785 PoolBuffer() = default;
786 PoolBuffer(const PoolBuffer&) = delete;
787 PoolBuffer& operator=(const PoolBuffer&) = delete;
788
789 void free(fz::stream_t s) {
790 if (ptr && pool) { pool->free(ptr, s); ptr = nullptr; capacity = 0; }
791 }
792 bool allocate(MemoryPool* p, size_t bytes, fz::stream_t s,
793 const char* tag, bool persistent = false) {
794 free(s);
795 pool = p;
796 ptr = pool->allocate(bytes, s, tag, persistent);
797 if (ptr) capacity = bytes;
798 return ptr != nullptr;
799 }
800 };
801
802 // cudaHostAlloc pinned host buffer — grows on demand, never shrinks.
803 struct PinnedBuffer {
804 void* ptr = nullptr;
805 size_t capacity = 0;
806
807 ~PinnedBuffer() { if (ptr) cudaFreeHost(ptr); }
808 PinnedBuffer() = default;
809 PinnedBuffer(const PinnedBuffer&) = delete;
810 PinnedBuffer& operator=(const PinnedBuffer&) = delete;
811
812 // Returns false on CUDA allocation failure.
813 bool ensureCapacity(size_t bytes) {
814 if (capacity >= bytes) return true;
815 if (ptr) { cudaFreeHost(ptr); ptr = nullptr; capacity = 0; }
816 if (cudaHostAlloc(&ptr, bytes, cudaHostAllocDefault) != cudaSuccess) return false;
817 capacity = bytes;
818 return true;
819 }
820 };
821
822 // cudaMalloc device buffer — grows on demand, never shrinks.
823 struct DeviceBuffer {
824 void* ptr = nullptr;
825 size_t capacity = 0;
826
827 ~DeviceBuffer() { if (ptr) cudaFree(ptr); }
828 DeviceBuffer() = default;
829 DeviceBuffer(const DeviceBuffer&) = delete;
830 DeviceBuffer& operator=(const DeviceBuffer&) = delete;
831
832 // Returns false on CUDA allocation failure.
833 bool ensureCapacity(size_t bytes) {
834 if (capacity >= bytes) return true;
835 if (ptr) { cudaFree(ptr); ptr = nullptr; capacity = 0; }
836 if (cudaMalloc(&ptr, bytes) != cudaSuccess) return false;
837 capacity = bytes;
838 return true;
839 }
840 };
841
842 // ── Internal helpers ──────────────────────────────────────────────────────
843
844 Stage* addRawStage(Stage* stage);
845
846 struct OutputBuffer {
847 void* d_ptr;
848 size_t actual_size;
849 size_t allocated_size;
850 std::string name;
851 int buffer_id;
852 };
853 std::vector<OutputBuffer> getOutputBuffers() const;
854
855 static void* loadCompressedData(
856 const std::string& filename,
857 const FZMFileHeader& header,
858 fz::stream_t stream = 0,
859 MemoryPool* pool = nullptr
860 );
861
862 void validate();
863 std::pair<std::vector<Stage*>, std::vector<Stage*>> identifyTopology();
864 void setupInputBuffers(const std::vector<Stage*>& sources);
865 int autoDetectUnconnectedOutputs();
866 void detectMultiOutputScenario(int pipeline_outputs);
867 void configureStreamsIfNeeded();
868
869 // finalize() sub-steps
870 void typeCheckConnections();
871 void computeInputAlignment();
874 void bindSemanticContracts();
878 void planAndInstallFusion();
879 void notifyStagesFinalizeHooks();
880 void refinePoolSize();
881 void preallocatePadBuffer();
882 void preallocateConcatBuffers();
883
884 // compress() helper: handles alignment padding.
885 // Returns the effective source pointer and padded source size.
886 std::pair<const void*, size_t> prepareInputSource(
887 const void* d_input, size_t input_size, fz::stream_t stream);
888
894 void propagateBufferSizes(bool force_from_current_inputs = false);
895
896 std::vector<Stage*> getSourceStages() const;
897 std::vector<Stage*> getSinkStages() const;
898
899 // ── Inverse DAG helpers ───────────────────────────────────────────────────
900
902 struct FwdStageDesc {
903 Stage* stage;
904 std::vector<int> output_buf_ids;
905 std::vector<int> input_buf_ids;
906 };
907
909 using PipelineOutputMap = std::unordered_map<int, std::pair<void*, size_t>>;
910
911 // decompress() helper: builds or reuses the inverse DAG cache.
912 void buildOrReuseInvCache(
913 const PipelineOutputMap& po_map,
914 Stage* src_stage,
915 size_t src_sz,
916 fz::stream_t stream);
917
926 std::vector<size_t> resolveDecompressSegmentSizes(
927 const void* d_input, size_t input_size, fz::stream_t stream) const;
928
935 PipelineOutputMap mapCompressedBufferPointers(
936 const void* d_input, const std::vector<size_t>& seg_sizes) const;
937
944 std::pair<Stage*, size_t> resolvePrimarySource() const;
945
953 void* allocateDecompressOutput(
954 size_t actual_size, void* caller_output, size_t caller_capacity,
955 fz::stream_t stream);
956
969 void decompressCore(
970 const void* d_input,
971 size_t input_size,
972 void* caller_output,
973 size_t caller_capacity,
974 bool synchronize,
975 void** d_output,
976 size_t* output_size,
977 fz::stream_t stream);
978
986 void buildStaticBufferMetadata();
987
993 std::vector<size_t> readConcatSegmentSizes(
994 const void* d_blob, size_t n, fz::stream_t stream) const;
995
996 // decompressFromFile() helpers.
998 static FZMFileHeader parseHeaderFromMemory(const void* data, size_t size);
999 static size_t computeFilePoolSize(const FZMFileHeader& fh, size_t pool_override_bytes);
1000 static std::pair<std::vector<std::unique_ptr<Stage>>, std::vector<FwdStageDesc>>
1001 reconstructForwardTopology(const FZMFileHeader& fh);
1002 static std::unordered_map<Stage*, size_t> buildSourceSizesFromHeader(
1003 const FZMFileHeader& fh, const std::vector<FwdStageDesc>& fwd_topology);
1004
1010 static std::pair<std::unique_ptr<CompressionDAG>,
1011 std::unordered_map<Stage*, int>>
1012 buildInverseDAG(
1013 const std::vector<FwdStageDesc>& fwd_stages,
1014 const PipelineOutputMap& pipeline_outputs,
1015 MemoryPool* pool,
1016 MemoryStrategy strategy,
1017 const std::unordered_map<Stage*, size_t>& source_sizes,
1018 bool enable_profiling,
1019 bool enable_inverse_fusion = false,
1022 bool caller_supplies_results = false
1023 );
1024
1025 // ── Concat helpers ────────────────────────────────────────────────────────
1026
1027 struct OutputBufferInfo {
1028 int buffer_id;
1029 void* d_ptr;
1030 size_t actual_size;
1031 std::string stage_name;
1032 std::string output_name;
1033 };
1034
1035 std::vector<OutputBufferInfo> collectOutputBuffers() const;
1036
1038 size_t calculateConcatSize(const std::vector<OutputBufferInfo>& outputs) const;
1039
1040 size_t writeConcatBuffer(
1041 const std::vector<OutputBufferInfo>& outputs,
1042 uint8_t* d_concat_bytes,
1043 fz::stream_t stream
1044 ) const;
1045
1046 void concatOutputs(void** d_output, size_t* output_size, fz::stream_t stream);
1047
1048 // ── Member variables ──────────────────────────────────────────────────────
1049
1050 std::unique_ptr<MemoryPool> mem_pool_;
1051 std::unique_ptr<CompressionDAG> dag_;
1052 MemoryStrategy strategy_;
1053
1054 std::vector<std::unique_ptr<Stage>> stages_;
1055 std::unordered_map<Stage*, DAGNode*> stage_to_node_;
1056
1057 struct ConnectionInfo {
1058 Stage* dependent;
1059 Stage* producer;
1060 std::string output_name;
1061 int output_index;
1062 };
1063 std::vector<ConnectionInfo> connections_;
1064
1065 int num_streams_;
1066 bool is_finalized_;
1067 bool warmup_on_finalize_;
1068 bool pool_managed_decomp_;
1069
1070 // is_compressed_: true after the first successful compress() (gates writeToFile).
1071 // was_compressed_: true between compress() and the next reset().
1072 bool is_compressed_;
1073 bool was_compressed_;
1074
1075 bool profiling_enabled_;
1078 bool coloring_enabled_ = true;
1079 PipelinePerfResult last_perf_result_;
1080
1081 std::vector<DAGNode*> input_nodes_;
1082 // Explicit choice of which input_nodes_ entry decompress() returns, for
1083 // pipelines with more than one source stage. Null = default to
1084 // input_nodes_[0]. Set via setPrimarySource(); resolved to an index lazily
1085 // (source stages aren't wired into input_nodes_ until finalize()).
1086 Stage* primary_source_stage_ = nullptr;
1087 // (node, buffer_id) pairs registered by bindExternalInput(), captured
1088 // immediately (before any later connect() calls add more buffer ids to
1089 // the same node). setupInputBuffers() appends these to input_nodes_/
1090 // input_buffer_ids_ after its own auto-discovery pass, since it clears
1091 // both first and auto-discovery alone would miss any stage that also
1092 // has real dependencies (getSourceStages() requires dependencies.empty()).
1093 std::vector<std::pair<DAGNode*, int>> explicit_external_bindings_;
1094 std::vector<DAGNode*> output_nodes_;
1095 std::vector<int> input_buffer_ids_;
1096 std::vector<int> output_buffer_ids_;
1097
1098 PoolBuffer d_concat_buffer_;
1099 bool needs_concat_;
1100
1101 // Pool-persistent decompress output buffers (one per source stage).
1102 // Only used when pool_managed_decomp_ == true.
1103 std::vector<void*> d_decomp_outputs_;
1104
1105 // Pinned host buffer for concat header (one H2D copy instead of N).
1106 PinnedBuffer h_concat_header_;
1107 // Persistent pinned host + device descriptor buffers for the gather kernel.
1108 PinnedBuffer h_copy_descs_;
1109 DeviceBuffer d_copy_descs_;
1110
1111 size_t input_size_;
1112
1113 // Per-source input sizes from the most recent compress(), ordered to match
1114 // input_nodes_. Used by decompress() to size each inverse result buffer.
1115 std::vector<size_t> source_input_sizes_;
1116
1117 // Input alignment in bytes — LCM of all stage getRequiredInputAlignment() values.
1118 // compress() zero-pads to this boundary transparently.
1119 size_t input_alignment_bytes_;
1120 PoolBuffer d_pad_buf_;
1124 bool fused_source_unpadded_ = false;
1125
1126 // Original (pre-padding) input size. decompress() uses this to trim the
1127 // reported output back to what the caller provided. 0 when no padding.
1128 size_t original_input_size_;
1129
1130 size_t input_size_hint_;
1131 float pool_multiplier_;
1132
1133 // Dataset dimensions (x=fast, y, z). Pushed to each stage on addStage() and
1134 // again at finalize(). Default {0,1,1} = 1-D, infer x from input size.
1135 std::array<size_t, 3> dims_;
1136
1145 struct InvDAGCache {
1146 std::unique_ptr<CompressionDAG> inv_dag;
1147 std::unordered_map<Stage*, int> inv_result_map;
1148 std::unordered_map<int, int> fwd_to_inv_ext_buf;
1149 std::unordered_map<Stage*, size_t> source_sizes;
1154 std::vector<size_t> fwd_size_signature;
1155 };
1156 std::unique_ptr<InvDAGCache> inv_cache_;
1158 std::vector<size_t> forwardSizeSignature() const;
1159
1160 struct BufferMetadata {
1161 int buffer_id;
1162 size_t actual_size;
1163 size_t allocated_size;
1164 std::string name;
1165 DAGNode* producer;
1166 int output_index;
1167 };
1168 std::vector<BufferMetadata> buffer_metadata_;
1169
1170 bool preserve_serialized_dims_ = false;
1171 FusionPolicy fusion_policy_ = FusionPolicy::Off;
1172 FusionInfo fusion_info_;
1173};
1174
1175// ── Template implementation ───────────────────────────────────────────────────
1176
1177template<typename StageT, typename... Args>
1178StageT* Pipeline::addStage(Args&&... args) {
1179 if (is_finalized_) {
1180 throw std::runtime_error("Cannot add stages after finalization");
1181 }
1182
1183 // if constexpr, not a runtime check: on an unsupported backend, StageT's
1184 // constructor may not exist in the build at all (its .cu translation
1185 // unit excluded — see Stage::isSupportedOnBackend()'s doc comment), so
1186 // every line below that references `new StageT()` must never be
1187 // instantiated at all, not merely never executed — hence the whole rest
1188 // of the function lives in the `if constexpr` branch rather than after
1189 // a standalone early-throw.
1190 if constexpr (!StageT::isSupportedOnBackend()) {
1191 throw std::runtime_error(
1192 "addStage(): this stage type is not supported on the current "
1193 "GPU backend (FZGMOD_BACKEND) this library was built for");
1194 } else {
1195 auto stage_ptr = std::make_unique<StageT>(std::forward<Args>(args)...);
1196 StageT* stage = stage_ptr.get();
1197
1198 stage->setDims(dims_);
1199
1200 DAGNode* node = dag_->addStage(stage, stage->getName());
1201 size_t num_outputs = stage->getNumOutputs();
1202 auto output_names = stage->getOutputNames();
1203
1204 // Pre-allocate all output slots as unconnected (size=1 placeholder).
1205 // connect() will promote any that get wired to downstream stages.
1206 for (size_t i = 0; i < num_outputs; i++) {
1207 std::string out_name = i < output_names.size() ? output_names[i] : std::to_string(i);
1208 dag_->addUnconnectedOutput(node, 1, i, stage->getName() + "." + out_name + "_unconnected");
1209 }
1210
1211 stage_to_node_[stage] = node;
1212 stages_.push_back(std::move(stage_ptr));
1213 return stage;
1214 }
1215}
1216
1217} // namespace fz
Definition device_buffer.h:54
Definition dag.h:104
Definition mempool.h:82
void free(void *ptr, fz::stream_t stream)
Definition device_buffer.h:84
Definition stage.h:31
virtual void setDims(const std::array< size_t, 3 > &dims)
Definition stage.h:207
TOML-based pipeline configuration file support.
Compression DAG wiring, execution, and memory strategy types.
Backend-neutral device span and buffer value types.
FZM binary file format definitions — structs, enums, and helpers.
Stream-ordered CUDA memory pool for pipeline buffer management.
Definition dag.h:24
SpecializationPolicy
Pipeline Specialization policy.
Definition compressor.h:63
SpecializationGroupInfo FusionGroupInfo
Definition compressor.h:75
MemoryStrategy
Definition dag.h:32
@ MINIMAL
Allocate on-demand, free at last consumer. Lowest peak memory.
Definition dag.h:33
SpecializationPolicy FusionPolicy
Definition compressor.h:67
SpecializationInfo FusionInfo
Definition compressor.h:87
Pipeline and per-stage profiling result types.
Base class interface for all compression stages.
Backward-compatible shim.
Definition device_buffer.h:35
Definition device_buffer.h:24
Fixed-size FZM file header core (80 bytes).
Definition fzm_format.h:275
Definition perf.h:78
Definition compressor.h:601
One finalize-time specialization selected for execution (compress or inverse).
Definition compressor.h:70
std::vector< std::string > stages
the stages it replaced
Definition compressor.h:72
std::string execution_path
last runtime subpath; empty if not applicable
Definition compressor.h:73
std::string implementation
strategy impl name, e.g. "warp-register"
Definition compressor.h:71
Resolved specialization decision for diagnostics and benchmark provenance.
Definition compressor.h:78
std::string fallback_reason
policy_off, no_legal_group, or legacy no_profitable_implementation; empty on a hit.
Definition compressor.h:85
std::vector< SpecializationGroupInfo > installed_inverse_groups
Lazily populated after the first decompress builds its inverse DAG.
Definition compressor.h:83
Backend-neutral GPU type aliases.