Skip to content

Commit 46251f5

Browse files
committed
adds missing guard for non-graph-compatible systems test
1 parent 91cf919 commit 46251f5

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Version numbers follow [Semantic Versioning](https://semver.org/).
1414
- CLI tests `BenchmarkGraphModeActivates` (graph capture succeeds for a `lorenzo->rle` pipeline, JSON reports `"active": true`) and `BenchmarkGraphModeFallsBackOnIncompatibleStage` (`huffman` terminal stage falls back silently, exit 0, `"active": false` with an `incompatible_reason`).
1515

1616
### Fixed
17+
- CLI test `BenchmarkGraphModeActivates` now skips (via a `cli_graph_supported()` mempool-fallback probe) instead of failing on vGPU / `cudaMalloc` fallback hosts where CUDA Graph capture is unsupported and the CLI silently falls back — matching the `GraphCapture` unit tests' `is_graph_supported()` guard.
1718
- **`fzgmod-cli -b --graph` aborted with a spurious `CUDA error … invalid argument` for any profiling-enabled pipeline that terminated in a deferred-size coder (e.g. the `cuszp`/`cuszp2` `AdaptiveBitpack` presets).** Graph capture succeeded, then compress() called `CompressionDAG::collectTimings()` after every `cudaGraphLaunch`; per-stage start/completion events are recorded by nodes baked into the captured graph, and `cudaEventElapsedTime()` across graph-recorded events returns `cudaErrorInvalidValue` on every node. That failure latched a sticky error into the CUDA context that then aborted the next unrelated kernel launch (surfacing as an "invalid argument" at the AdaptiveBitpack decode kernel; `CUDA_LAUNCH_BLOCKING=1` masked it). Fix: (1) skip the per-stage timing pass on a graph replay in `Pipeline::compress()` (the whole-pipeline `dag_elapsed_ms` from the outer `DagEventTimer`, recorded on `stream` outside the graph, is still valid); (2) `collectTimings()` now consumes the sticky error via `cudaGetLastError()` after a failed `cudaEventElapsedTime()` so it can never resurface downstream; (3) `CompressionDAG::execute()` no longer records the timing-only `start_event` during graph capture, avoiding dead nodes in the graph. `--graph` now round-trips `cuszp`/`cuszp2` at identical fidelity to non-graph (CLDHGH 70.83 dB). Per-stage `stages[]` for the graph-replayed compress is now empty by design (decompress, which runs the normal DAG, still reports it).
1819
- `examples/presets/cusz_hi_tp.toml` — set `code_type = "uint8"` + `quant_radius = 128` on the GInterp stage (was `uint16` / `32768`), matching cuSZ-Hi's actual spline ectrl (`ErrCtrlTrait<1> = u1`, `context.h` default `dict_size=256, radius=128`). Native's spline quant emits **1-byte** codes in `[0, 256)` and escapes any residual outside ±128 to the outlier compaction buffer (`spline3.inl:564`); our old preset used 2-byte codes with a wide radius that kept every residual inline, so the code stream was both twice as wide and higher-entropy. Halving the code width + tightening the radius roughly doubles TP CR at identical fidelity: **CLDHGH 7.68× → 12.47×** (native 13.33×), NYX 512³ 4.58× → 7.74×, CESM 4.11× → 7.65×; round-trip PSNR unchanged (CLDHGH 66.81 dB). This closes almost the entire TP-mode CR deficit vs native. Verified this was **not** an auto-tuning gap: enabling `auto_tuning = 3/4` on top adds < 0.5% CR (12.47× → 12.51×). Also confirmed not a BIT/RRE gap — our `RREStage` is the vendored LC `d_RRE`, and reimplementing bitshuffle as native's exact `d_BIT_1` gave zero change. (Supersedes the earlier `quant_radius = 32768` interim fix, which only reached 7.68×.)
1920
- **GInterp (cuSZ-Hi spline) produced non-deterministic, sometimes catastrophically wrong (~1e9 error) reconstructions on data with extreme values / sharp gradients — e.g. NYX/temperature, which round-tripped at PSNR ≈ −8 dB (garbage) instead of ~75 dB.** Three root causes, all fixed:

tests/test_cli.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,23 @@ TEST(CLI, BenchmarkCompressSingleRunWorks) {
299299
EXPECT_EQ(rc, 0);
300300
}
301301

302+
// CUDA Graph capture requires a real device memory pool; on vGPU / cudaMalloc
303+
// fallback mode it is unsupported and the CLI silently falls back. Mirrors the
304+
// GraphCapture unit tests' is_graph_supported() guard.
305+
static bool cli_graph_supported() {
306+
fz::Pipeline probe(1024, fz::MemoryStrategy::PREALLOCATE, 1.0f);
307+
return !probe.isMemPoolFallbackMode();
308+
}
309+
302310
// --graph should succeed for a graph-compatible pipeline (lorenzo->rle) and emit
303311
// "active": true in the JSON report. Graph mode accelerates the (repeated)
304312
// compress path only; the benchmark's decompress round-trip runs the normal
305313
// inverse DAG, so the terminal coder here must round-trip cleanly (mirrors the
306314
// Lorenzo->RLE pipeline exercised by the GraphCapture unit tests).
307315
TEST(CLI, BenchmarkGraphModeActivates) {
316+
if (!cli_graph_supported()) {
317+
GTEST_SKIP() << "Graph mode unsupported in cudaMalloc fallback mode (vGPU)";
318+
}
308319
TempWorkspace tmp;
309320

310321
constexpr size_t kN = 1 << 11;

0 commit comments

Comments
 (0)