Conversation
|
| f"[latency] scenario=no_cache batch_size={batch_size} " | ||
| f"avg_ms={sum(wall_ms) / len(wall_ms):.4f} " | ||
| f"min_ms={min(wall_ms):.4f} max_ms={max(wall_ms):.4f}", | ||
| flush=True, |
There was a problem hiding this comment.
--timed-iters accepts zero or negative values, which produce no request batches. The new latency summary then divides by len(wall_ms) and calls min and max on the empty list, so any scenario run with --timed-iters 0 crashes instead of completing. Validate that the iteration count is positive before running a scenario. The same aggregation pattern appears in the GPU-hit, CPU-hit, and SSD-hit summaries.
| if args.history_len is not None: | ||
| cfg = replace(cfg, history_len=args.history_len) |
There was a problem hiding this comment.
Negative history length crashes
The new --history-len option accepts negative integers, and the value is later used directly as a tensor dimension in build_request. For example, --history-len -1 aborts request construction before the benchmark can run. Reject negative history lengths during argument validation so users receive a clear error.
Action sequences include candidates so preprocess accepts no_cache. Drain offload via KVCacheManager.backend when the wrapper has no ongoing_offload_tasks.
c07e488 to
41aef17
Compare
Description
This PR extends the FlexKV HSTU inference benchmark with a
no_cachepath and a--history-lenCLI flag, so no-cache, naive GPU-hit, and naive CPU-hit can be compared on the same request shape.--scenariosnow acceptsgpu_hit,cpu_hit,ssd_hit, andno_cache.no_cachemust be run by itself; it usesforward_nokvcacheand does not start FlexKV.--history-lencontrols the cached/recomputed prefix (default 1024). Timed length is stillhistory_len + append_history_lenunless--only-onboard.Example (CPU-only FlexKV, no SSD config):
Do not pass
--flexkv-config-pathunless SSD is intended (ssd_cache_gb: 0and nossd_cache_dirkeeps SSD off).Checklist