Skip to content

[None][docs] fix legacy benchmark KV cache config - #18671

Open
imitater-dou wants to merge 1 commit into
NVIDIA:mainfrom
imitater-dou:docs/fix-legacy-kv-cache-config
Open

[None][docs] fix legacy benchmark KV cache config#18671
imitater-dou wants to merge 1 commit into
NVIDIA:mainfrom
imitater-dou:docs/fix-legacy-kv-cache-config

Conversation

@imitater-dou

@imitater-dou imitater-dou commented Sep 3, 2026

Copy link
Copy Markdown

Summary

  • nest the legacy benchmark's forced KV cache dtype under kv_cache_config
  • name the accepted kv_cache_config.dtype field in the adjacent tip

Why

tensorrt_llm/bench/benchmark/utils/general.py reads the YAML through llm_args_dict.get(\"kv_cache_config\", {\"dtype\": \"auto\"}) and then reads dtype from that mapping. The documented top-level kv_cache_dtype is therefore ignored and the benchmark falls back to auto.

Test plan

  • Reproduced the current parser expression locally: {\"kv_cache_dtype\": \"fp8\"} resolves to auto, while {\"kv_cache_config\": {\"dtype\": \"fp8\"}} resolves to fp8
  • git diff --check

Signed-off-by: ADou ikun3.1415927@gmail.com

Dev Engineer Review

  • Updated the PyTorch workflow example to nest the cache dtype under kv_cache_config.dtype.
  • Documented the accepted values: auto, fp8, and nvfp4.
  • The change matches the parser configuration path and prevents an unintended fallback to auto.
  • No public entities, test files, or configuration files changed.

QA Engineer Review

No test changes.

Nest the documented cache dtype under the runtime key so benchmark configuration no longer silently falls back to auto.

Signed-off-by: ADou <ikun3.1415927@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9bd4bb74-6cbf-414e-9447-0f5050d7c420

📥 Commits

Reviewing files that changed from the base of the PR and between 3901bca and c729c5e.

📒 Files selected for processing (1)
  • docs/source/legacy/performance/perf-benchmarking.md

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

The benchmarking documentation replaces the legacy kv_cache_dtype setting with kv_cache_config.dtype. The documented values remain auto, fp8, and nvfp4.

Changes

Quantization documentation

Layer / File(s) Summary
Update KV cache dtype example
docs/source/legacy/performance/perf-benchmarking.md
The PyTorch workflow example uses nested kv_cache_config.dtype configuration and retains the valid values auto, fp8, and nvfp4.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to c729c

The benchmark documentation now shows the KV-cache dtype in the configuration structure consumed by the runtime, preventing the example from silently defaulting to auto. The change is ready to merge.

Suggested reviewers: bowenfu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies a documentation fix for the legacy benchmark KV cache configuration. It is concise and related to the main change.
Description check ✅ Passed The description explains the issue, the parser behavior, the documentation change, and the validation performed. It does not include the PR checklist section, but the core required information is comp…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the issue, the parser behavior, the documentation change, and the validation performed. It does not include the PR checklist section, but the core required information is complete.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant