[None][fix] remove unsupported INT8 from trtllm-bench --quantization choices#16245
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthrough
ChangesQuantization choice alignment
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/unittest/others/test_bench_quant_choices.py (1)
23-39: 📐 Maintainability & Code Quality | 🔵 TrivialQA list update is unnecessary.
This is narrow CPU-only unittest coverage and does not alter scheduled integration scope.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/unittest/others/test_bench_quant_choices.py` around lines 23 - 39, The added tests in test_int8_not_offered_as_bench_quant_choice, test_every_offered_choice_is_buildable, and test_int8_from_quant_algo_still_raises are unnecessary CPU-only QA coverage; remove these tests and leave the scheduled integration test scope unchanged.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/unittest/others/test_bench_quant_choices.py`:
- Around line 23-39: The added tests in
test_int8_not_offered_as_bench_quant_choice,
test_every_offered_choice_is_buildable, and
test_int8_from_quant_algo_still_raises are unnecessary CPU-only QA coverage;
remove these tests and leave the scheduled integration test scope unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1cfb1d1f-1156-4889-9f1b-f0799e112328
📒 Files selected for processing (2)
tensorrt_llm/bench/utils/__init__.pytests/unittest/others/test_bench_quant_choices.py
|
Thanks @dc3671 — addressed: removed the comment and slimmed to the single |
|
@lonexreb Yes, please help combine two existed files and your newly added file into test_bench.py. Thanks~ |
|
Done — combined |
|
@lonexreb There is another file: test_bench_statistics.py , and seems there are conflict with upstream |
9486cae to
aaa1ce4
Compare
Combine test_bench_data.py and test_bench_statistics.py with the new INT8 quant-choice test into a single tests/unittest/others/test_bench.py, per review on NVIDIA#16245. All upstream tests are preserved verbatim. Signed-off-by: lonexreb <reach2shubhankar@gmail.com>
|
@dc3671 Thanks for catching that — done. Two things were wrong on my side:
GitHub now reports the PR as mergeable with no conflicts. The diff is: the one-line |
|
/bot run |
|
PR_Github #59630 [ run ] triggered by Bot. Commit: |
|
PR_Github #59630 [ run ] completed with state
|
…choices INT8 was advertised as a trtllm-bench build --quantization choice but is excluded from QUANT_ALGO_LIST, so selecting it crashed with an AssertionError in QuantMode.from_quant_algo. Drop INT8 from VALID_QUANT_ALGOS so the advertised choices match what the build path actually supports, and cover it with a test in test_bench_data.py. Fixes NVIDIA#7091 Signed-off-by: lonexreb <reach2shubhankar@gmail.com>
Combine test_bench_data.py and test_bench_statistics.py with the new INT8 quant-choice test into a single tests/unittest/others/test_bench.py, per review on NVIDIA#16245. All upstream tests are preserved verbatim. Signed-off-by: lonexreb <reach2shubhankar@gmail.com>
ee56db3 to
098daa2
Compare
|
/bot run |
|
PR_Github #59713 [ run ] triggered by Bot. Commit: |
|
PR_Github #59713 [ run ] completed with state
|
|
/bot run |
|
PR_Github #59717 [ run ] triggered by Bot. Commit: |
|
PR_Github #59717 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #60077 [ run ] triggered by Bot. Commit: |
|
PR_Github #60077 [ run ] completed with state |
BowenFu
left a comment
There was a problem hiding this comment.
Reviewed the bench quantization choice fix. The change is narrow and aligns the advertised trtllm-bench --quantization choices with the existing backend contract: QuantMode.from_quant_algo excludes QuantAlgo.INT8 for the main quantization path, so offering INT8 here would deterministically fail rather than enable a supported build mode.\n\nThe test consolidation preserved the existing bench tests and adds targeted coverage that INT8 is not offered as a bench quantization choice. Final Blossom CI on the head commit is green, and the earlier change request was addressed with a subsequent member approval.\n\nAlso ran an independent Claude cross-check before approving; it agreed this is safe to approve. Non-blocking: a future follow-up could add a broader invariant test that every advertised choice is accepted by QuantMode.from_quant_algo.
Description
Fixes #7091.
trtllm-bench build --helpadvertisedINT8as a valid--quantizationvalue, but selecting it crashed:QUANT_ALGO_LIST(intensorrt_llm/quantization/mode.py) deliberately excludesQuantAlgo.INT8(set(QuantAlgo) - {QuantAlgo.INT8}), so INT8 is not buildable via this path — yet it was still listed inVALID_QUANT_ALGOS, which feeds the Click--quantizationchoices.Change
Remove
INT8fromVALID_QUANT_ALGOSintensorrt_llm/bench/utils/__init__.pyso the advertised choices match what the build path supports (with a comment explaining the exclusion).Test
New CPU-only unit tests in
tests/unittest/others/test_bench_quant_choices.py: INT8 is not an offered choice, every offered choice is accepted byQuantMode.from_quant_algo, and INT8 still raises (documenting the exclusion).Note
A prior identical fix (PR #13292) was closed unmerged without explanation. This aligns the advertised choices with the code's deliberate exclusion; if maintainers instead intend to add INT8 support to the build path, that is a larger change and this can be closed in favor of it.
Summary by CodeRabbit
Bug Fixes
Tests