Repository navigation
Drop 31 no-op ALWAYS_INLINE keywords + fix SDRBench dataset URLs - #140
Merged
Merged
Conversation
Benchmarking on Anvil (EPYC 7763; GCC 10.2/11.2/14.2, AOCC clang 12) and locally (GCC 16.2, AppleClang) shows the attribute changes nothing at 31 of the 49 sites: the compilers already inline these, and removing the keyword either yields a byte-identical binary or measures zero. What the data says to keep, and why this is not a bulk removal: LinearQuantizer (5) + BlockwiseIterator (9) carry the entire effect. Downgrading just those two groups costs ~7.5%; downgrading everything else together costs ~0.2%. No single group crosses GCC's inlining threshold on its own, so per-group numbers hide this -- it only shows up when the two are isolated. They keep the attribute. Config.hpp to_lower keeps its inline: it is the only namespace-scope non-template among the sites, and without it the library stops linking. interp_akima / interp_pchip keep theirs: both are multi-line with branches, both currently have no callers, so the byte-identical result for them is vacuous and says nothing about future use. QuantOptimization.hpp lorenzo_predict_3d keeps its attribute; the function is dead code today but is expected to come back. Deleted rather than downgraded to plain inline: 27 of the 31 are in-class definitions (implicitly inline) and 4 are namespace-scope templates (already weak/COMDAT), so no keyword is needed to preserve linkage. Included here are the two on ComposedPredictor::predict/estimate_error, which is where GCC 16 actually hard-errors: the class is itself a PredictorInterface and may nest, so speculative devirtualization recurses into itself until the inline budget is exhausted -- and a failed always_inline is an error, not a warning. That is what broke the MinGW CI job on the fz branch. Verified: builds clean under GCC 16.2 and AppleClang; ALGO_LORENZO_REG, ALGO_INTERP_LORENZO, ALGO_INTERP and ALGO_NOPRED all round-trip within the error bound on the in-tree smoke file and on miranda 384x384x256. Co-Authored-By: Claude Opus 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR reduces exposure to hard compilation failures from ALWAYS_INLINE by removing it from header functions/methods where it does not provide measurable benefit, while retaining it in the identified performance-critical or semantically sensitive sites.
Changes:
- Removed
ALWAYS_INLINEfrom a set of small interpolation and Lorenzo helper templates. - Removed
ALWAYS_INLINEfrom predictor/quantizer virtual interface methods and several in-class overrides where it was unnecessary. - Removed
ALWAYS_INLINEfromConfigenum helper templates while keeping it onto_lower.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| include/SZ3/utils/Interpolators.hpp | Drops ALWAYS_INLINE from several interpolation/Lorenzo templates while keeping it on Akima/PCHIP. |
| include/SZ3/utils/Config.hpp | Drops ALWAYS_INLINE from enum helper templates (match_enum, enum_to_string), keeps to_lower forced-inline. |
| include/SZ3/quantizer/Quantizer.hpp | Removes ALWAYS_INLINE from pure-virtual quantizer interface declarations. |
| include/SZ3/predictor/RegressionPredictor.hpp | Removes ALWAYS_INLINE from in-class override methods (predict, estimate_error). |
| include/SZ3/predictor/Predictor.hpp | Removes ALWAYS_INLINE from pure-virtual predictor interface declarations. |
| include/SZ3/predictor/LorenzoPredictor.hpp | Removes ALWAYS_INLINE from in-class overrides and small in-class helper methods. |
| include/SZ3/predictor/ComposedPredictor.hpp | Removes ALWAYS_INLINE from small forwarding overrides (predict, estimate_error). |
Suppressed comments (2)
include/SZ3/utils/Interpolators.hpp:57
lorenzo_3d's parameter list is missing spaces after commas (T e,T f,T g), which is inconsistent with the rest of the file's formatting.
T lorenzo_3d(T a, T b, T c, T d, T e,T f,T g) {
include/SZ3/utils/Interpolators.hpp:63
- There is trailing whitespace and multiple consecutive blank lines after
lorenzo_3d, which is noise in diffs and can trigger whitespace-only lint checks.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+42
to
43
| T interp_cubic_natural(T a, T b, T c, T d) { | ||
| return 0.575 * (b + c) - 0.075 * (a + d); |
All eight integration-test datasets return 404. SDRBench moved to a new Globus endpoint, changing both the host and the path prefix: g-8d6b0.fd635.8443.data.globus.org/ds131.2/Data-Reduction-Repo/raw-data/ g-d0cd3f.fd635.8443.data.globus.org/raw-data/ exaalt-copper and exaalt-helium were also renamed upstream, from SDRBENCH-exaalt-* to SDRBENCH-EXAALT-*, so the host swap alone still left those two at 404. New URLs taken from https://sdrbench.github.io/datasets.html and confirmed reachable (HTTP 206 on a range request) for all eight. The integration test matrix covers exactly these datasets, so CI on this PR is the real check that each archive still unpacks to the filenames datasets.json expects. Co-Authored-By: Claude Opus 5 <[email protected]>
ayzk
added a commit
that referenced
this pull request
Sep 16, 2026
…posable (#142) * Drop 31 no-op ALWAYS_INLINE keywords + fix SDRBench dataset URLs (#140) * Drop 31 no-op ALWAYS_INLINE keywords Benchmarking on Anvil (EPYC 7763; GCC 10.2/11.2/14.2, AOCC clang 12) and locally (GCC 16.2, AppleClang) shows the attribute changes nothing at 31 of the 49 sites: the compilers already inline these, and removing the keyword either yields a byte-identical binary or measures zero. What the data says to keep, and why this is not a bulk removal: LinearQuantizer (5) + BlockwiseIterator (9) carry the entire effect. Downgrading just those two groups costs ~7.5%; downgrading everything else together costs ~0.2%. No single group crosses GCC's inlining threshold on its own, so per-group numbers hide this -- it only shows up when the two are isolated. They keep the attribute. Config.hpp to_lower keeps its inline: it is the only namespace-scope non-template among the sites, and without it the library stops linking. interp_akima / interp_pchip keep theirs: both are multi-line with branches, both currently have no callers, so the byte-identical result for them is vacuous and says nothing about future use. QuantOptimization.hpp lorenzo_predict_3d keeps its attribute; the function is dead code today but is expected to come back. Deleted rather than downgraded to plain inline: 27 of the 31 are in-class definitions (implicitly inline) and 4 are namespace-scope templates (already weak/COMDAT), so no keyword is needed to preserve linkage. Included here are the two on ComposedPredictor::predict/estimate_error, which is where GCC 16 actually hard-errors: the class is itself a PredictorInterface and may nest, so speculative devirtualization recurses into itself until the inline budget is exhausted -- and a failed always_inline is an error, not a warning. That is what broke the MinGW CI job on the fz branch. Verified: builds clean under GCC 16.2 and AppleClang; ALGO_LORENZO_REG, ALGO_INTERP_LORENZO, ALGO_INTERP and ALGO_NOPRED all round-trip within the error bound on the in-tree smoke file and on miranda 384x384x256. Co-Authored-By: Claude Opus 5 <[email protected]> * Fix SDRBench dataset URLs: Globus endpoint moved All eight integration-test datasets return 404. SDRBench moved to a new Globus endpoint, changing both the host and the path prefix: g-8d6b0.fd635.8443.data.globus.org/ds131.2/Data-Reduction-Repo/raw-data/ g-d0cd3f.fd635.8443.data.globus.org/raw-data/ exaalt-copper and exaalt-helium were also renamed upstream, from SDRBENCH-exaalt-* to SDRBENCH-EXAALT-*, so the host swap alone still left those two at 404. New URLs taken from https://sdrbench.github.io/datasets.html and confirmed reachable (HTTP 206 on a range request) for all eight. The integration test matrix covers exactly these datasets, so CI on this PR is the real check that each archive still unpacks to the filenames datasets.json expects. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> * Add 12 CPU modules + tests; fix 10 pre-existing bugs MGARD/SPERR fused paths kept as *FusedDecomposition and still drive ALGO_MGARD / ALGO_SPERR; the composable compositions take the default names. Co-Authored-By: Claude Opus 5 <[email protected]> * Add missing <memory> includes libstdc++ does not provide std::make_shared transitively; the new test translation units changed the include order enough to expose it. Co-Authored-By: Claude Opus 5 <[email protected]> * Add module acceptance gate Group-level contract checks (ModuleContract.hpp) and a header self-containment check, both runnable and wired into CI; docs/MODULE_ACCEPTANCE.md records what a module must satisfy to enter the library. Each check comes from a defect class that has shipped here. Fixes found by the two checks: 9 headers were not self-contained, and MemoryUtil::read guarded remaining_length with assert, which Release compiles out, so a truncated stream read past the buffer. Co-Authored-By: Claude Opus 5 <[email protected]> * Make every header self-contained under libstdc++ too The check only ran under libc++ locally, which provides more transitively; 17 headers were missing <limits>, <cmath>, <cstddef>, def.hpp or a project header. CI now runs the check on the macOS job as well, so a clean run under one standard library no longer passes for both. Co-Authored-By: Claude Opus 5 <[email protected]> * Charge the encoded size when loading regression coefficients RegressionPredictor::load debited remaining_length by the decoded bin count (coeff_size * sizeof(int)) while decode() advances the cursor by the much smaller encoded byte count, so the budget ran out early. Harmless while the guard in MemoryUtil::read was an assert compiled out of Release builds; now that it throws, the HDF5 filter path hit it on miranda velocity fields at eb=1e-4. Co-Authored-By: Claude Opus 5 <[email protected]> * Size the HDF5 filter's compressed buffer from SZ_compress_size_bound sizeof(T) * num * 2 is below SZ_compress's own minimum for a small chunk, so an explicit chunk of a few hundred elements aborted with "The buffer for compressed data is not large enough". The integration test now covers an explicit small chunk alongside the full and auto-chunked cases. Co-Authored-By: Claude Opus 5 <[email protected]> * Add the Decomposition group contract Six decompositions did not override size_est(), so SZGenericCompressor sized its buffer from 0 while the quantizer's unpredictable list could be arbitrarily large; three are fixed here and the rest already had one. The contract also records MGARD's bound limitation: it quantizes coefficients per level and never checks the reconstruction, so the transform's own round-off passes through and the absolute bound holds only while max|x| * epsilon<T> << eb. Also restores the H5Z filter's buffer headroom on top of SZ_compress's minimum. Co-Authored-By: Claude Opus 5 <[email protected]> * Make Lossless_bypass respect its destination capacity compress() memcpy'd srcLen bytes into dst regardless of dstCap, so any payload larger than the caller's buffer was an unconditional heap overflow. Lossless_zstd already checks and throws; bypass now does the same. Caught by AddressSanitizer on Linux: ALGO_BIOMDXTC pairs its codec with Lossless_bypass, so nothing shrinks the payload, and the HDF5 filter's buffer was sized from SZ_compress's minimum, which assumes it does. glibc reported it as "munmap_chunk(): invalid pointer"; macOS's allocator did not abort, which is why it only showed up in CI. The filter's headroom is restored here too - it was lost restoring a backup during an earlier A/B. Co-Authored-By: Claude Opus 5 <[email protected]> * Account for the selection stream in ComposedPredictor::load decode() advances the cursor but leaves remaining_length untouched, so the bound check was too loose for everything read after it. Same defect class as RegressionPredictor::load, in the opposite direction. MemoryUtil::read now compares by division so the size computation cannot overflow on its own. Co-Authored-By: Claude Opus 5 <[email protected]> * Complete the module acceptance gate; add the module benchmark tool Contracts now cover the Lossless group as well; its destination-capacity check is what Lossless_bypass was missing. Adds tests for SZGenericCompressor's two guards on get_out_range, which had none. GranularBitRoundQuantizer's tests move out of test_quantizer_cluster.cpp into their own file. tools/bench/module_bench.cpp (BUILD_SZ3_BENCH=ON) measures a composition's compression ratio, achieved error and throughput on a real dataset and prints CSV. Module characteristics can only be measured, not authored, so this is the piece the composition metadata will need. Co-Authored-By: Claude Opus 5 <[email protected]> * Bring the docs level with the modules modules.json was missing 8 modules; CLAUDE.md's quantizer list predated five of them and had no preprocessor list at all. Both now also point at the acceptance gate and the benchmark tool. Co-Authored-By: Claude Opus 5 <[email protected]> * Install the group contracts; record composition constraints ModuleContract.hpp moves to include/SZ3/testing/ so it ships with the library: the gate is meant to apply to modules submitted from outside this tree, which cannot reach a header under tools/test/. modules.json gains a `composition` block on the 13 modules that constrain what they can be composed with -- an encoder that cannot derive its own bin range, a decomposition that only works with one encoder, bins that are not a countable domain, the regime an error bound holds in, a measured bad pairing. These are the facts a composition engine needs before any measured characteristic, and each one is already enforced by a test or by the code. SZ3_ModulesJson checks the file against the tree so the two cannot drift. Co-Authored-By: Claude Opus 5 <[email protected]> * Make MGARD honour its error bound unconditionally MGARD quantized coefficients per level and never checked the reconstruction, so the synthesis round-off -- which scales with the field's magnitude -- passed through. For float at eb = 1e-2 a magnitude of 1e6 reached 1.17x eb and 1e7 reached 6.25x; every other decomposition checks the value it writes back and diverts to an unpredictable list. Both MGARD compositions now replay the decoder's inverse transform and record what still misses into an OutlierQuantizer, carried in save() the way LinearQuantizer carries its unpredictable list. Costs an inverse transform and a copy of the input on the compress side: miranda velocityx 301 MB, 500 -> 293 MB/s compressing, decompression and compression ratio unchanged (201.35 vs 201.36 at relative eb 1e-2). Changes the ALGO_MGARD stream only; the other seven algorithms are byte-identical. Co-Authored-By: Claude Opus 5 <[email protected]> * Record what the MGARD outlier pass costs The bound now holds unconditionally, but not for free everywhere: outliers cost nothing where the transform already met the bound, trade compression for the bound where it did not, and degenerate to near-lossless on a field that leaves the per-level quantizer saturated. The measured numbers are in the header. Co-Authored-By: Claude Opus 5 <[email protected]> * Give each branch and pull request one CI run at a time Every push added a full matrix without retiring the one in flight, so the long integration jobs of older runs were evicted mid-test instead of finishing -- hacc and exaalt-helium died at 13-17 and 25-30 minutes across three runs while the same jobs completed in 2h10m and 46m on a branch that was not being pushed to repeatedly. master and fz still keep every commit's build result; only feature branches and superseded pull-request runs are cancelled. Co-Authored-By: Claude Opus 5 <[email protected]> * Consolidate the pending bug fixes: 8 open PRs plus the fz-branch findings Bug fixes only. Nothing here changes the compressed format or an interface signature, and every algorithm's output is byte-identical to master's (verified over 31 dataset/algorithm/error-bound combinations, plus decompressing files master produced). From the open pull requests, reviewed line by line: #131 Config::load read one byte past the end of the config blob #132 bounds-check the whole decompression path (see the two skips below) #133 shift-by-64 UB for a single-symbol Huffman tree #134 bounds-check HuffmanEncoderV2 tree loading #135 bounds-check XtcBasedEncoder's magicInts index; plug a leaked buffer #137 remaining_length accounting after Huffman decode in both predictors #138 non-finite float to int64_t cast UB in LinearQuantizer #139 scratch buffers leaked when compression throws; OMP chunk capacity was missing room for the size header Lossless_zstd writes Two parts of #132 are deliberately not taken: - It moves the quant_inds count from after the encoder's tree to before it so the tree is immediately followed by its encoded stream. That is a compressed format change and it is not versioned, so files written by any released SZ3 fail to decode. The bound it was buying is recovered instead by letting the caller supply it: HuffmanEncoder::set_decode_bound(), called by SZGenericCompressor once it has consumed the count, and by both predictors. load() no longer guesses the bound from its own buffer -- the tree and the stream are not required to share a buffer, and test_encoder.cpp puts them in separate ones. - It reinterprets LosslessInterface::decompress's `dstLen` as an input capacity when the caller provides the buffer. The declared contract is that it is an output, and callers do pass uninitialised values, so this fails nondeterministically (it broke LosslessTest.LosslessBypass here). The self-allocating branch, where a non-zero value is opt-in, is kept. Also fixed while reviewing: - HuffmanEncoderV2 sized its dense tables from an unbounded `maxval` read straight from the stream; #134 bounds the node count but not this. - HuffmanEncoderV2's node count is an int holding a value read as 64-bit, so the new bound is checked with an explicit sign test rather than an implicit conversion. - test_lossless.cpp passed an uninitialised size to decompress(). From the fz branch, verified to reproduce here: Lossless_bypass::compress ignored its destination capacity, so any payload larger than the caller's buffer was an unconditional heap overflow; TimeSeriesDecomposition violated its error bound 1.94x on the null-reference-frame path; ArithmeticEncoder sign-extended a shift, corrupting about half of all streams; HuffmanEncoder's stateNum narrowing overflowed on a wide bin range; RunlengthEncoder and two decompositions had no size_est(), so the compressor sized its buffer from 0; KmeansUtil had reserve+operator[] UB and an off-by-one read; the HDF5 filter sized its buffer below SZ_compress's own minimum; 24 headers were not self-contained under libstdc++ or libc++; .gitignore's bare `test` pattern hid every test file. Co-Authored-By: Claude Opus 5 <[email protected]> * Restore PR #135's XtcBasedEncoder bounds Taking the fz-branch fixes file by file overwrote them. The magicInts index and the packed-data size both come from the compressed stream and were used unchecked. Co-Authored-By: Claude Opus 5 <[email protected]> * Compare by division in the bounded array read num_elements * sizeof(T1) can overflow on its own, which is the computation the check is supposed to guard. Matches the scalar overload and PR #132. Co-Authored-By: Claude Opus 5 <[email protected]> * Drop PR #132's bound on the internal decompression buffer It bounds that buffer by SZ_compress_size_bound, which is the size of the *output* buffer. compress() sizes the internal one as max(1000, 2 * (decomposition.size_est() + encoder.size_est() + sizeof(Q) * bins)), so for a 64-bit bin type it is far larger and valid streams are rejected. Every module in this tree emits int bins, so the bound happens to hold and these tests cannot reach it -- the fz branch has three modules that do (BitplaneEncoder, BitTruncationQuantizer, FixedPointQuantizer) and all three failed. A corrupted declared size is still caught, after the allocation, by the zstd frame check and the size comparison this PR adds to Lossless_zstd::decompress. Co-Authored-By: Claude Opus 5 <[email protected]> * Validate config contents only for a compressed-stream trailer PR #132 rejects N outside [1, 4] and dimensions whose product differs from the element count. Both hold for a config read from the end of a compressed stream, and neither holds for the HDF5 filter's cd_values: those carry placeholder zeros that set_local fills in later, as cdvalueHelper.py says in as many words. The check killed the whole filter -- 80 of cesm-atm's 160 integration cases aborted with "invalid number of dimensions", across every algorithm. The single-argument overload, which is what the filter and the OpenMP path use, now says so explicitly and skips the content checks; the bounded overload used by SZ_decompress keeps them. Verified against the real cesm-atm field through the HDF5 filter: five algorithms pass, and removing the guard reproduces the abort. Co-Authored-By: Claude Opus 5 <[email protected]> * Validate config contents only for a compressed-stream trailer The check PR #132 adds for N outside [1, 4] and for dimensions whose product differs from the element count holds for a config read from the end of a compressed stream, and not for the HDF5 filter's cd_values: those carry placeholder zeros that set_local fills in later, as cdvalueHelper.py says in as many words. It killed the whole filter -- 80 of cesm-atm's 160 and 96 of exaalt-copper's 192 integration cases aborted with "invalid number of dimensions", across every algorithm. Verified against the real cesm-atm field through the HDF5 filter. Co-Authored-By: Claude Opus 5 <[email protected]> * Bound the integration build's parallelism A bare "-j" means unlimited parallel compilation. This tree now has 56 translation units against master's 9, and they pull in MGARD, SPERR and Eigen, so the peak at link time is enough to get a 15 GB runner terminated: hacc died three times at exit 143 immediately after "100% Linking CXX executable sz3ToHDF5", with no error of its own, 86 GB of disk still free and every other dataset passing. Co-Authored-By: Claude Opus 5 <[email protected]> * Make the integration test's output survive a killed job Python block-buffers stdout into the log pipe, so everything the driver prints -- including the captured output of every test it runs -- is lost when the job is terminated. The log then stops at the last write from a subprocess, which is the build, and says nothing about where the run actually died. hacc has failed four times with exit 143 and a log that ends at the same line; that line is where the visible output stops, not where the failure is, and two hypotheses I drew from it were wrong for exactly that reason. Runs the driver with -u, and flushes around dataset preparation so the phase is identifiable even without it. Co-Authored-By: Claude Opus 5 <[email protected]> * Stream each integration case's output instead of capturing it capture_output=True prints the child's output only after it exits, so a case that never returns leaves no trace of how far it got. hacc has now failed five times; the log ends at the "command:" line for its first case -- a single 1.12 GB field written as one chunk -- and everything that case printed is still invisible. Co-Authored-By: Claude Opus 5 <[email protected]> * Bound the HDF5 filter test's small-chunk mode The mode asked for 8-element chunks over the whole field. On a 1D field of 280 million elements that is 35 million chunks, and the HDF5 chunk index alone took the process to 15.3 GiB of a CI runner's 16 GiB -- hacc and exaalt-helium were killed there. Restricting the mode to a leading slice of at most 4096 chunks brings the peak to 9.6 GiB and leaves the mode's coverage intact: an unfixed filter still fails it on every algorithm at ordinary dataset sizes. Also stop tracking a stray __pycache__ entry. Co-Authored-By: Claude Opus 5 <[email protected]> * Register the four newer algorithms in the HDF5 cd_values helper The helper's name-to-enum map stopped at ALGO_BIOMDXTC, so ALGO_SVD, ALGO_ZFP, ALGO_SPERR and ALGO_MGARD could not be requested through the HDF5 filter at all. All four round-trip correctly through the filter, on the in-tree smoke file and on a 256x384x384 field, in every chunk mode. Co-Authored-By: Claude Opus 5 <[email protected]> * Cover the HDF5 filter's compressed-buffer sizing The filter has to size its output buffer from SZ_compress_size_bound rather than from the raw chunk size, and nothing in the suite exercised that: a chunk small enough for the compressed block to exceed it never appeared. This adds a third chunk mode that asks for 8-element chunks, which the pre-fix filter rejects with "buffer not large enough" on every algorithm. The mode is restricted to a leading slice of at most 4096 chunks. Over a whole field it would mean tens of millions of chunks, and the HDF5 chunk index alone takes the process past a CI runner's memory. Co-Authored-By: Claude Opus 5 <[email protected]> * Stop the docs workflow from deploying on a closed pull request The `pull_request: [closed]` trigger runs on refs/pull/N/merge, which the github-pages environment does not accept, so it fails every time. It first fired when #146 merged: run 34993302305 failed while the push to fz at the same moment (34993301679) deployed the same docs successfully. The push trigger already covers merges into fz. Co-Authored-By: Claude Opus 5 <[email protected]> * Drop the two capability traits the merge made unnecessary quantizer_size_est() detected whether a quantizer has size_est(). QuantizerInterface now declares it with a default of zero, the way DecompositionInterface already declares its own, so every quantizer answers and the detection is not needed. The four that had none encode every value and have no unpredictable list, which is what zero means. encoder_has_decode_bound detected set_decode_bound(), which decode()'s byte-budget parameter replaced; nothing called either, and the member the setter wrote was read by a check that could no longer fire. Co-Authored-By: Claude Opus 5 <[email protected]> * Take out what the merge and the review left behind The include unions the merge produced left five headers including the same thing twice. Two comments in HuffmanEncoder described members the previous commit removed, one of them sitting above an unrelated field; two of its checks repeat the loop bound `maxBits` already enforces, one per bit of the decoded stream. InterpolationDecomposition's only change was a comment saying the same thing at greater length, and an include it does not use; so were the <limits> in the two predictors and the blank lines in BlockwiseIterator. SZAlgoZFP asserts without including <cassert>; it had been getting it through a header that no longer offers it. module_bench has no caller — no workflow, no test, no documentation outside its own option. It measures rather than asserts, so it cannot become a test, but it belongs with them rather than behind an option of its own. Co-Authored-By: Claude Opus 5 <[email protected]> * Fix the doubled include guard and a stray blank line SPERRDecomposition guards on SZ3_SZ3_SPERR_DECOMPOSITION_HPP. No guard in the tree collides, so nothing was being skipped, but the name says the file twice. Co-Authored-By: Claude Opus 5 <[email protected]> * Say what the module contract covers, and list the uid it omits The contract header claimed every module in the library passes it and pointed at a file that does not exist. Eight do not: OutlierQuantizer deliberately, since it is a second pass held inside three decompositions whose bins never reach SZGenericCompressor, so its range spans the bin type instead of starting at zero. The uid table in the add-module skill lists eight of the nine in use. A module author picking the next free value from it lands on OutlierQuantizer's, and a uid collision is read as the wrong quantizer's state rather than rejected. Co-Authored-By: Claude Opus 5 <[email protected]> * Put the three decompositions the contract skipped under it PaSTRI, SPERRFused and the composable SPERR implement the decomposition interface and pass the group contract unchanged — they were simply never registered. A contract only holds what it is pointed at, so a module outside it can be broken by an unrelated change and nothing says so. Co-Authored-By: Claude Opus 5 <[email protected]> * Put the two bit-plane encoders under the contract as well Both are general-purpose encoders that compose with any decomposition, and both pass the group contract unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> * Deduce the bin type from a typedef, and hold callers to it QuantizerInterface takes To as a template parameter but never published it, so a decomposition wanting to forward its quantizer's bin type had to recover it from the return type of quantize_and_overwrite. The interface now exposes it as bin_type, which every quantizer inherits, and quantizer_bin_t goes away with its twenty lines of explanation. The deduction is a default argument, so it only holds while the caller leaves To alone. Passing a To the quantizer does not emit compiled silently and narrowed every bin on assignment -- 5e9 from a FixedPointQuantizer arrived as 705032704. NoPrediction already asserted against that; MultiLevel and Blockwise now do too. module_bench builds with the tests since it moved there, which on MinGW means building the SPERR and MGARD pipelines it exists to compare, and those are disabled on MinGW. Co-Authored-By: Claude Opus 5 <[email protected]> * Name the bin type by the interface's own word, and clear the merge residue SZGenericCompressor recovered the bin type from the return type of compress(), the same decltype shape quantizer_bin_t used. compress() is a pure virtual override, so that type is always the To the decomposition declared: DecompositionInterface publishes it as bin_type and the compressor reads it, under the interfaces' own name To. Five quantizers did not say override on size_est(). Four are caught by -Wsuggest-override; LinearQuantizer's is non-const, so it hid the interface's virtual rather than overriding it, and a call through a base reference would have reported an empty unpredictable list. The rest is residue: doubled blank lines in four headers, a comment restating the line under it, and a Runlength doc block left above the wrong function when its duplicate size_est() went. Co-Authored-By: Claude Opus 5 <[email protected]> * Find Eigen's headers when CMake found it through its config Eigen3_DIR names the directory holding Eigen3Config.cmake, which is never the directory holding Eigen/Dense. The check guessed one sibling, eigen-src, which is right only for the FetchContent build tree; against an Eigen installed under a prefix -- conda, spack, a non-default homebrew -- every header that reaches stdafx.hpp was reported as not self-contained. It now walks up to the prefix that owns Eigen/Dense. 84 headers, 0 not self-contained, against an Eigen from a mamba environment. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
ayzk
added a commit
that referenced
this pull request
Sep 16, 2026
#145's content was already here through the squash in 160269d, so this brings #127's HDF5_IS_PARALLEL propagation and the rest of #140's ALWAYS_INLINE removals. Every file both branches have now matches master's count; what is left sits in quantizers master does not have. The conflicts were fz's additions against master's include reordering. fz keeps its doc comments, the four extra algorithm wirings, the bin_type work and the SVD config fields; master's ordering and its QuantOptimization dedup are taken. The merge itself stacked three copies of one compress() doc block and re-added two duplicate includes, removed here. Co-Authored-By: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits, reviewable separately. The second is folded in here rather than kept as its own PR because the integration-test matrix cannot pass without it — every dataset 404s on
mastertoday, so the first commit's CI would be red for reasons unrelated to it.1. Drop 31 no-op
ALWAYS_INLINEkeywordsALWAYS_INLINEis applied at 49 sites underinclude/SZ3/. Benchmarking says the attribute changes nothing at 31 of them — the compilers already inline those functions, and removing the keyword either yields a byte-identical binary or measures zero.That matters because a failed
always_inlineis a hard compile error, not a warning. Keywords that buy nothing are pure downside: the MinGW CI job on thefzbranch died exactly this way when MSYS2 moved to GCC 16 and--param inline-unit-growthran out.Why this is not a bulk removal
The effect is superadditive, so per-group numbers are misleading.
LinearQuantizer(5 sites) andBlockwiseIterator(9) carry all of it: downgrading just those two costs ~7.5%, while downgrading everything else together costs ~0.2%. Neither crosses GCC's inlining threshold alone, so measuring one group at a time shows nothing. Both keep the attribute.Also kept:
Config.hppto_lower— the only namespace-scope non-template among the sites. Withoutinlinethe library stops linking.interp_akima/interp_pchip— multi-line with branches, and currently callerless, so their byte-identical result is vacuous and says nothing about future use.QuantOptimization.hpplorenzo_predict_3d— dead code today, expected to return.Deleted, not downgraded
27 of the 31 are in-class definitions (implicitly inline per [class.mfct]/1) and 4 are namespace-scope templates (already weak/COMDAT), so no keyword is needed to preserve linkage. A two-TU link test confirms the classification in both directions, including a negative control that fails as predicted when the
to_lowerkeyword is also removed.Included are the two on
ComposedPredictor::predict/estimate_error, which is where GCC 16 actually hard-errors: the class is itself aPredictorInterfaceand may nest, so speculative devirtualization recurses into it until the inline budget is exhausted.Verification
ALGO_LORENZO_REG,ALGO_INTERP_LORENZO,ALGO_INTERP,ALGO_NOPREDall round-trip within the error bound; 909 correctness runs showed no behavioural differences2. Fix SDRBench dataset URLs
All eight integration-test datasets 404. SDRBench moved to a new Globus endpoint, changing both the host and the path prefix:
exaalt-copperandexaalt-heliumwere also renamed upstream,SDRBENCH-exaalt-*toSDRBENCH-EXAALT-*, so the host swap alone still left those two at 404.New URLs taken from https://sdrbench.github.io/datasets.html. Verified on #141 before folding in here: all eight integration tests pass, which also confirms each archive still unpacks to the filenames
datasets.jsonexpects — worth checking rather than assuming, given two files were renamed upstream.🤖 Generated with Claude Code