FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
lorenzo_quant.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "stage/stage.h"
8#include "fzm_format.h"
9#include "backend/types.h"
10#include "log.h"
11#include <array>
12#include <cstdint>
13#include <memory>
14#include <cmath>
15#include <cstring>
16
17namespace fz {
18
19
40enum class ErrorBoundMode : uint8_t {
41 ABS = 0,
42 REL = 1,
43 NOA = 2,
44 PREL = 3,
45};
46
61inline ErrorBoundMode resolveApproxRelMode(ErrorBoundMode mode, const char* stage_name) {
62 if (mode != ErrorBoundMode::REL) return mode;
64 "%s: ErrorBoundMode::REL is deprecated for this stage and has been "
65 "mapped to PREL (abs_eb = eb * max(|data|)). This does NOT guarantee a "
66 "per-element relative bound. Use PREL explicitly to silence this, or "
67 "QuantizerStage with REL for an exact point-wise bound.",
68 stage_name);
70}
71
81 uint32_t quant_radius;
82 uint32_t num_elements;
83 uint32_t outlier_count;
86 uint8_t ndim;
87 uint8_t eb_mode;
88 uint32_t dim_x;
89 uint32_t dim_y;
90 uint32_t dim_z;
91 float user_eb;
92 float value_base;
93 uint8_t zigzag_codes;
94 uint8_t centering;
95 uint8_t reserved[2];
104
105 // Total: 60 bytes (fits easily in 128B stage_config)
106
109 input_type(DataType::FLOAT32), code_type(DataType::UINT16),
110 ndim(1), eb_mode(0), dim_x(0), dim_y(1), dim_z(1),
111 user_eb(0.0f), value_base(0.0f), zigzag_codes(0), centering(0),
112 reserved{0, 0}, error_bound_f64(0.0), value_base_f64(0.0) {}
113};
114static_assert(sizeof(LorenzoQuantConfig) <= FZM_STAGE_CONFIG_SIZE, "LorenzoQuantConfig must fit in FZM_STAGE_CONFIG_SIZE");
115
143template<typename TInput = float, typename TCode = uint16_t>
144class LorenzoQuantStage : public Stage {
145public:
147 struct Config {
148 float error_bound = 1e-3;
149 int quant_radius = 32768;
150 float outlier_capacity = 0.2f;
154 std::array<size_t, 3> dims = {0, 1, 1};
164 bool zigzag_codes = false;
173 bool centering = false;
174 Config() = default;
175 Config(TInput eb, TCode radius = 32768, float outlier_cap = 0.2f,
176 std::array<size_t, 3> d = {0, 1, 1})
177 : error_bound(eb), quant_radius(radius), outlier_capacity(outlier_cap),
178 dims(d) {}
179 };
180
181 explicit LorenzoQuantStage(const Config& config = Config());
182 ~LorenzoQuantStage() override;
183
185 fz::stream_t stream,
186 MemoryPool* pool,
187 const std::vector<void*>& inputs,
188 const std::vector<void*>& outputs,
189 const std::vector<size_t>& sizes
190 ) override;
191
197 void postStreamSync(fz::stream_t stream) override;
198
203 void onFinalize(size_t estimated_inlen, MemoryPool* pool) override;
204
205 size_t estimateDeviceFootprintBytes(size_t /*estimated_inlen*/) const override {
206 return sizeof(uint32_t);
207 }
208
209 std::string getName() const override { return "LorenzoQuant"; }
210 size_t getNumInputs() const override {
211 return is_inverse_ ? (config_.centering ? 4 : 3) : 1;
212 }
213 size_t getNumOutputs() const override {
214 return is_inverse_ ? 1 : (config_.centering ? 4 : 3);
215 }
216
217 std::vector<std::string> getOutputNames() const override {
218 if (config_.centering)
219 return {"codes", "outlier_errors", "outlier_indices", "means"};
220 return {"codes", "outlier_errors", "outlier_indices"};
221 }
222
223 std::vector<size_t> estimateOutputSizes(
224 const std::vector<size_t>& input_sizes
225 ) const override;
226
227 std::unordered_map<std::string, size_t> getActualOutputSizesByName() const override {
228 auto names = getOutputNames();
229 std::unordered_map<std::string, size_t> result;
230 for (size_t i = 0; i < names.size() && i < actual_output_sizes_.size(); i++) {
231 result[names[i]] = actual_output_sizes_[i];
232 }
233 return result;
234 }
235 size_t getActualOutputSize(int index) const override {
236 return (index >= 0 && index < static_cast<int>(actual_output_sizes_.size()))
237 ? actual_output_sizes_[index] : 0;
238 }
239
240 // Preserve the forward-mode actual_output_sizes_ across decompression passes.
241 // decompressMulti() calls saveState()/restoreState() around each inverse
242 // execute() to prevent the inverse pass from permanently corrupting the
243 // 4-element forward output-size vector (inverse sets it to a 1-element vector).
244 void saveState() override { saved_output_sizes_ = actual_output_sizes_; }
245 void restoreState() override { actual_output_sizes_ = saved_output_sizes_; }
246
247 // Configuration accessors
248 void setErrorBound(TInput error_bound) { config_.error_bound = error_bound; }
249 void setQuantRadius(TCode radius) { config_.quant_radius = radius; }
250 void setOutlierCapacity(float capacity) { config_.outlier_capacity = capacity; }
251 void setDims(const std::array<size_t, 3>& dims) override { config_.dims = dims; }
257 config_.eb_mode = resolveApproxRelMode(mode, "LorenzoQuantStage");
258 }
259 // Provide a pre-computed value_range (NOA) or max(|data|) (PREL) to skip
260 // the internal data scan during execute(). Pass 0 to re-enable auto-scan.
261 void setValueBase(float value_base) { config_.precomputed_value_base = value_base; }
262 void setZigzagCodes(bool enable) { config_.zigzag_codes = enable; }
267 void setCentering(bool enable) { config_.centering = enable; }
268 void setDims(size_t x, size_t y = 1, size_t z = 1) { config_.dims = {x, y, z}; }
269
270 TInput getErrorBound() const { return config_.error_bound; }
271 TCode getQuantRadius() const { return config_.quant_radius; }
272 float getOutlierCapacity() const { return config_.outlier_capacity; }
273 std::array<size_t, 3> getDims() const { return config_.dims; }
274 ErrorBoundMode getErrorBoundMode() const { return config_.eb_mode; }
279 TInput getComputedAbsErrorBound() const { return computed_abs_eb_; }
280 float getValueBase() const { return config_.precomputed_value_base; }
281 bool getZigzagCodes() const { return config_.zigzag_codes; }
282 bool getCentering() const { return config_.centering; }
283
285 int ndim() const {
286 if (config_.dims[2] > 1) return 3;
287 if (config_.dims[1] > 1) return 2;
288 return 1;
289 }
290
291 void setInverse(bool inverse) { is_inverse_ = inverse; }
292 bool isInverse() const { return is_inverse_; }
293
294 // ── Serialization ─────────────────────────────────────────────────────────
295
296 uint16_t getStageTypeId() const override {
297 return static_cast<uint16_t>(StageType::LORENZO_QUANT);
298 }
299
300 uint8_t getOutputDataType(size_t output_index) const override {
301 switch (output_index) {
302 case 0: return static_cast<uint8_t>(getCodeDataType()); // codes
303 case 1: return static_cast<uint8_t>(getInputDataType()); // outlier_errors
304 case 2: return static_cast<uint8_t>(DataType::UINT32); // outlier_indices
305 default: return static_cast<uint8_t>(DataType::UINT8);
306 }
307 }
308
309 uint8_t getInputDataType(size_t /*input_index*/) const override {
310 return static_cast<uint8_t>(getInputDataType());
311 }
312
313 size_t serializeHeader(size_t output_index, uint8_t* header_buffer, size_t max_size) const override {
314 (void)output_index; // Lorenzo uses same header for all outputs
315
316 if (max_size < sizeof(LorenzoQuantConfig)) {
317 throw std::runtime_error("Insufficient buffer for Lorenzo config");
318 }
319
320 LorenzoQuantConfig config;
321 config.error_bound = static_cast<float>(computed_abs_eb_); // abs bound used by decompressor
322 config.quant_radius = static_cast<uint32_t>(config_.quant_radius);
323 config.num_elements = static_cast<uint32_t>(num_elements_);
324 config.outlier_count = actual_outlier_count_;
325 config.input_type = getInputDataType();
326 config.code_type = getCodeDataType();
327 config.ndim = static_cast<uint8_t>(ndim());
328 config.eb_mode = static_cast<uint8_t>(config_.eb_mode);
329 config.dim_x = static_cast<uint32_t>(config_.dims[0]);
330 config.dim_y = static_cast<uint32_t>(config_.dims[1]);
331 config.dim_z = static_cast<uint32_t>(config_.dims[2]);
332 config.user_eb = static_cast<float>(config_.error_bound); // original user-specified value
333 config.value_base = static_cast<float>(computed_value_base_);
334 config.error_bound_f64 = static_cast<double>(computed_abs_eb_);
335 config.value_base_f64 = static_cast<double>(computed_value_base_);
336 config.zigzag_codes = config_.zigzag_codes ? uint8_t{1} : uint8_t{0};
337 config.centering = config_.centering ? uint8_t{1} : uint8_t{0};
338 config.reserved[0] = 0; config.reserved[1] = 0;
339
340 std::memcpy(header_buffer, &config, sizeof(LorenzoQuantConfig));
341 return sizeof(LorenzoQuantConfig);
342 }
343
344 size_t getMaxHeaderSize(size_t output_index) const override {
345 (void)output_index;
346 return sizeof(LorenzoQuantConfig);
347 }
348
349 void deserializeHeader(const uint8_t* header_buffer, size_t size) override {
350 // Minimum size is the original 32-byte layout (before user_eb/value_base were added).
351 constexpr size_t kLegacySize = 32;
352 if (size < kLegacySize) {
353 throw std::runtime_error("Invalid Lorenzo config size");
354 }
355
356 LorenzoQuantConfig config;
357 std::memcpy(&config, header_buffer, std::min(size, sizeof(LorenzoQuantConfig)));
358
359 // error_bound in the header is always the absolute bound used at compression.
360 // Prefer the full-precision copy; pre-2026-08-08 headers leave it 0.
361 constexpr size_t kSizeBeforeF64 = 44;
362 const bool has_f64 = (size > kSizeBeforeF64 && config.error_bound_f64 != 0.0);
363 config_.error_bound = config.error_bound;
364 computed_abs_eb_ = has_f64 ? static_cast<TInput>(config.error_bound_f64)
365 : static_cast<TInput>(config.error_bound);
366 config_.quant_radius = static_cast<TCode>(config.quant_radius);
367 num_elements_ = config.num_elements;
368 actual_outlier_count_= config.outlier_count;
369 // New fields: present only in headers written by v1+ (≥40B, added user_eb/value_base/eb_mode).
370 constexpr size_t kV1Size = 40;
371 if (size >= kV1Size) {
372 // Files written before the PREL split stored eb_mode==REL for what
373 // was always the approximate mode. Map it silently (no warning —
374 // decode uses the stored absolute error_bound regardless of mode).
375 auto stored = static_cast<ErrorBoundMode>(config.eb_mode);
376 config_.eb_mode = (stored == ErrorBoundMode::REL)
377 ? ErrorBoundMode::PREL : stored;
378 config_.precomputed_value_base = config.value_base;
379 computed_value_base_ = has_f64
380 ? static_cast<TInput>(config.value_base_f64)
381 : static_cast<TInput>(config.value_base);
382 } else {
384 config_.precomputed_value_base = 0.0f;
385 computed_value_base_ = static_cast<TInput>(0);
386 }
387 // zigzag_codes field added in v2 (≥44B). Compared against the literal v2
388 // size, not sizeof(LorenzoQuantConfig) — the struct has grown since (the
389 // f64 bound fields), and keying off sizeof would stop reading these
390 // fields from every v2 archive.
391 constexpr size_t kV2Size = 44;
392 if (size >= kV2Size) {
393 config_.zigzag_codes = (config.zigzag_codes != 0);
394 // `centering` reuses a byte older writers zeroed as `reserved`, so
395 // pre-centering archives decode as centering-off.
396 config_.centering = (config.centering != 0);
397 } else {
398 config_.zigzag_codes = false;
399 config_.centering = false;
400 }
401
402 // Restore spatial dimensions; handle old (pre-dims) files gracefully
403 int eff_ndim = (config.ndim == 0) ? 1 : static_cast<int>(config.ndim);
404 // dim_x: stored explicitly; fall back to derivation for old files
405 if (config.dim_x > 0) {
406 config_.dims[0] = config.dim_x;
407 } else if (config.num_elements > 0) {
408 size_t yz = std::max<size_t>(1, config.dim_y) * std::max<size_t>(1, config.dim_z);
409 config_.dims[0] = config.num_elements / yz;
410 } else {
411 config_.dims[0] = 0;
412 }
413 if (eff_ndim >= 2) {
414 config_.dims[1] = (config.dim_y > 0) ? config.dim_y : 1;
415 } else {
416 config_.dims[1] = 1;
417 }
418 if (eff_ndim >= 3) {
419 config_.dims[2] = (config.dim_z > 0) ? config.dim_z : 1;
420 } else {
421 config_.dims[2] = 1;
422 }
423 }
424
425private:
426 Config config_;
427 std::vector<size_t> actual_output_sizes_;
428 std::vector<size_t> saved_output_sizes_; // saved by saveState(), restored by restoreState()
429 size_t num_elements_ = 0; // Track for header
430 uint32_t actual_outlier_count_ = 0; // Track for header
431 bool is_inverse_ = false; // false = compress, true = decompress
435 TInput computed_abs_eb_ = 0;
438 TInput computed_value_base_ = static_cast<TInput>(0);
445 uint32_t* d_outlier_count_scratch_ = nullptr;
448 MemoryPool* persistent_pool_ = nullptr;
453 std::weak_ptr<const void> persistent_pool_alive_;
454
455
458 void initOutlierCountScratch(MemoryPool* pool);
459
460 DataType getInputDataType() const {
461 if (std::is_same<TInput, float>::value) return DataType::FLOAT32;
462 if (std::is_same<TInput, double>::value) return DataType::FLOAT64;
463 return DataType::FLOAT32;
464 }
465
466 DataType getCodeDataType() const {
467 if (std::is_same<TCode, uint8_t>::value) return DataType::UINT8;
468 if (std::is_same<TCode, uint16_t>::value) return DataType::UINT16;
469 if (std::is_same<TCode, uint32_t>::value) return DataType::UINT32;
470 return DataType::UINT16;
471 }
472
473 size_t getMaxOutlierCount(size_t num_elements) const {
474 return static_cast<size_t>(std::ceil(num_elements * config_.outlier_capacity));
475 }
476};
477
478extern template class LorenzoQuantStage<float, uint16_t>;
479extern template class LorenzoQuantStage<float, uint8_t>;
480extern template class LorenzoQuantStage<double, uint16_t>;
481extern template class LorenzoQuantStage<double, uint32_t>;
482
483// Kernel launcher declarations — defined in lorenzo.cu.
484
485template<typename TInput, typename TCode>
486void launchLorenzoKernel(
487 const TInput* d_input, size_t n,
488 TInput ebx2_r, TCode quant_radius,
489 TCode* d_codes, TInput* d_outlier_errors,
490 uint32_t* d_outlier_indices, uint32_t* d_outlier_count,
491 size_t max_outliers, int grid_size,
492 bool zigzag_codes,
493 fz::stream_t stream,
494 // Per-tile means output (one per 1024-element tile), or nullptr to disable
495 // adaptive centering.
496 TInput* d_means = nullptr
497);
498
499template<typename TInput, typename TCode>
500void launchLorenzoInverseKernel(
501 const TCode* d_codes,
502 const TInput* d_outlier_errors, const uint32_t* d_outlier_indices,
503 uint32_t outlier_n,
504 size_t n,
505 TInput ebx2, TCode quant_radius,
506 TInput* d_output,
507 bool zigzag_codes,
508 fz::stream_t stream, MemoryPool* pool,
509 // Per-tile means from the forward pass, or nullptr if centering is off.
510 const TInput* d_means = nullptr
511);
512
514template<typename TInput, typename TCode>
516 const TInput* d_input, size_t nx, size_t ny,
517 TInput ebx2_r, TCode quant_radius,
518 TCode* d_codes, TInput* d_outlier_errors,
519 uint32_t* d_outlier_indices, uint32_t* d_outlier_count,
520 size_t max_outliers,
521 bool zigzag_codes,
522 fz::stream_t stream
523);
524
526template<typename TInput, typename TCode>
528 const TCode* d_codes,
529 const TInput* d_outlier_errors, const uint32_t* d_outlier_indices,
530 uint32_t outlier_n,
531 size_t nx, size_t ny,
532 TInput ebx2, TCode quant_radius,
533 TInput* d_output,
534 bool zigzag_codes,
535 fz::stream_t stream, MemoryPool* pool
536);
537
539template<typename TInput, typename TCode>
541 const TInput* d_input, size_t nx, size_t ny, size_t nz,
542 TInput ebx2_r, TCode quant_radius,
543 TCode* d_codes, TInput* d_outlier_errors,
544 uint32_t* d_outlier_indices, uint32_t* d_outlier_count,
545 size_t max_outliers,
546 bool zigzag_codes,
547 fz::stream_t stream
548);
549
551template<typename TInput, typename TCode>
553 const TCode* d_codes,
554 const TInput* d_outlier_errors, const uint32_t* d_outlier_indices,
555 uint32_t outlier_n,
556 size_t nx, size_t ny, size_t nz,
557 TInput ebx2, TCode quant_radius,
558 TInput* d_output,
559 bool zigzag_codes,
560 fz::stream_t stream, MemoryPool* pool
561);
562
563} // namespace fz
Definition lorenzo_quant.h:144
std::unordered_map< std::string, size_t > getActualOutputSizesByName() const override
Definition lorenzo_quant.h:227
int ndim() const
Returns the effective spatial dimensionality (1, 2, or 3).
Definition lorenzo_quant.h:285
void postStreamSync(fz::stream_t stream) override
uint8_t getOutputDataType(size_t output_index) const override
Definition lorenzo_quant.h:300
uint16_t getStageTypeId() const override
Definition lorenzo_quant.h:296
void setCentering(bool enable)
Definition lorenzo_quant.h:267
void setErrorBoundMode(ErrorBoundMode mode)
Definition lorenzo_quant.h:256
size_t getActualOutputSize(int index) const override
Definition lorenzo_quant.h:235
void saveState() override
Definition lorenzo_quant.h:244
size_t serializeHeader(size_t output_index, uint8_t *header_buffer, size_t max_size) const override
Definition lorenzo_quant.h:313
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
size_t getMaxHeaderSize(size_t output_index) const override
Definition lorenzo_quant.h:344
size_t estimateDeviceFootprintBytes(size_t) const override
Definition lorenzo_quant.h:205
std::string getName() const override
Definition lorenzo_quant.h:209
uint8_t getInputDataType(size_t) const override
Definition lorenzo_quant.h:309
void deserializeHeader(const uint8_t *header_buffer, size_t size) override
Definition lorenzo_quant.h:349
std::vector< std::string > getOutputNames() const override
Definition lorenzo_quant.h:217
void onFinalize(size_t estimated_inlen, MemoryPool *pool) override
void setDims(const std::array< size_t, 3 > &dims) override
Definition lorenzo_quant.h:251
void setInverse(bool inverse)
Definition lorenzo_quant.h:291
std::vector< size_t > estimateOutputSizes(const std::vector< size_t > &input_sizes) const override
TInput getComputedAbsErrorBound() const
Definition lorenzo_quant.h:279
Definition mempool.h:82
Definition stage.h:31
FZM binary file format definitions — structs, enums, and helpers.
Logging infrastructure and macros.
#define FZ_LOG(level,...)
Definition log.h:201
Definition dag.h:24
void launchLorenzoKernel3D(const TInput *d_input, size_t nx, size_t ny, size_t nz, TInput ebx2_r, TCode quant_radius, TCode *d_codes, TInput *d_outlier_errors, uint32_t *d_outlier_indices, uint32_t *d_outlier_count, size_t max_outliers, bool zigzag_codes, fz::stream_t stream)
3-D forward Lorenzo kernel launcher.
ErrorBoundMode
Definition lorenzo_quant.h:40
@ PREL
Pseudo-relative: eb × max(|data|), applied as a single ABS bound.
@ NOA
Value-range relative bound (norm-of-absolute).
@ ABS
Absolute error bound.
@ REL
Exact per-element point-wise relative bound (QuantizerStage only).
ErrorBoundMode resolveApproxRelMode(ErrorBoundMode mode, const char *stage_name)
Definition lorenzo_quant.h:61
void launchLorenzoKernel2D(const TInput *d_input, size_t nx, size_t ny, TInput ebx2_r, TCode quant_radius, TCode *d_codes, TInput *d_outlier_errors, uint32_t *d_outlier_indices, uint32_t *d_outlier_count, size_t max_outliers, bool zigzag_codes, fz::stream_t stream)
2-D forward Lorenzo kernel launcher. nx is the fast (x) dimension.
constexpr size_t FZM_STAGE_CONFIG_SIZE
Per-stage serialized config slot (bytes)
Definition fzm_format.h:65
DataType
Element data type identifiers used in buffer and stage descriptors.
Definition fzm_format.h:139
void launchLorenzoInverseKernel3D(const TCode *d_codes, const TInput *d_outlier_errors, const uint32_t *d_outlier_indices, uint32_t outlier_n, size_t nx, size_t ny, size_t nz, TInput ebx2, TCode quant_radius, TInput *d_output, bool zigzag_codes, fz::stream_t stream, MemoryPool *pool)
3-D inverse Lorenzo kernel launcher.
@ WARN
Unexpected but recoverable: outlier overflow, fallbacks.
void launchLorenzoInverseKernel2D(const TCode *d_codes, const TInput *d_outlier_errors, const uint32_t *d_outlier_indices, uint32_t outlier_n, size_t nx, size_t ny, TInput ebx2, TCode quant_radius, TInput *d_output, bool zigzag_codes, fz::stream_t stream, MemoryPool *pool)
2-D inverse Lorenzo kernel launcher.
Base class interface for all compression stages.
Definition lorenzo_quant.h:79
uint8_t zigzag_codes
1 if codes are zigzag-encoded, else 0.
Definition lorenzo_quant.h:93
float value_base
value_range (NOA) or max(|data|) (REL) used in conversion.
Definition lorenzo_quant.h:92
uint8_t centering
1 if per-tile mean centering is enabled, else 0.
Definition lorenzo_quant.h:94
DataType input_type
Original input type (1B).
Definition lorenzo_quant.h:84
uint32_t quant_radius
Quantization radius.
Definition lorenzo_quant.h:81
float error_bound
Absolute bound after mode conversion (used by decompressor).
Definition lorenzo_quant.h:80
uint8_t eb_mode
ErrorBoundMode cast to uint8_t.
Definition lorenzo_quant.h:87
uint32_t num_elements
Total element count.
Definition lorenzo_quant.h:82
uint8_t ndim
Spatial dimensionality 1/2/3 (0 treated as 1).
Definition lorenzo_quant.h:86
double value_base_f64
Full-precision value_base; 0 in pre-2026-08-08 headers.
Definition lorenzo_quant.h:103
double error_bound_f64
Definition lorenzo_quant.h:102
uint32_t dim_z
Z dimension (1 for 1-D/2-D).
Definition lorenzo_quant.h:90
uint8_t reserved[2]
Definition lorenzo_quant.h:95
DataType code_type
Quantization code type (1B).
Definition lorenzo_quant.h:85
uint32_t dim_y
Y dimension (1 for 1-D).
Definition lorenzo_quant.h:89
uint32_t outlier_count
Actual number of outliers.
Definition lorenzo_quant.h:83
float user_eb
Original user-specified error bound value.
Definition lorenzo_quant.h:91
uint32_t dim_x
X (fast) dimension; 0 = infer from num_elements.
Definition lorenzo_quant.h:88
Definition lorenzo_quant.h:147
int quant_radius
Quantization radius (2^15 for uint16_t).
Definition lorenzo_quant.h:149
ErrorBoundMode eb_mode
Definition lorenzo_quant.h:158
float error_bound
Error bound (interpretation depends on eb_mode).
Definition lorenzo_quant.h:148
bool zigzag_codes
Definition lorenzo_quant.h:164
float outlier_capacity
Definition lorenzo_quant.h:150
float precomputed_value_base
Definition lorenzo_quant.h:161
bool centering
Definition lorenzo_quant.h:173
std::array< size_t, 3 > dims
Definition lorenzo_quant.h:154
Backend-neutral GPU type aliases.