Skip to content

[https://nvbugs/6501376][fix] Test-only fix — drop the if hidden_size % 2 != 0: with pytest.raises(...)#16844

Open
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6501376
Open

[https://nvbugs/6501376][fix] Test-only fix — drop the if hidden_size % 2 != 0: with pytest.raises(...)#16844
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6501376

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: Stale pytest.raises(AssertionError) on the odd-hidden_size branch expected a divisibility assert that PR [TRTLLM-13117][feat] Implement Uneven TP Linear for VisualGen models #14875's _auto_tp_sharding no longer fires for VANILLA row/column Linear.
  • Fix: Test-only fix — drop the if hidden_size % 2 != 0: with pytest.raises(...) branch in both test_row_linear and test_column_linear; unconditionally for r in results: assert r is True.
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Dev Engineer Review

  • Updated test_column_linear and test_row_linear to reflect uneven tensor-parallel support introduced for VANILLA Linear modules.
  • Removed stale pytest.raises(AssertionError) expectations for odd hidden_size values.
  • Tests now consistently assert that all ranks return True; no API, configuration, or production-code changes were made.
  • Verdict: sufficient.

QA Engineer Review

  • Modified tests: test_column_linear, test_row_linear.
  • No test-list changes were identified; test-list coverage should be verified in test-db/ or qa/.
  • Verdict: needs follow-up.

…mn linear

PR NVIDIA#14875 added VANILLA-mode uneven-TP support in
tensorrt_llm/_torch/modules/linear.py via _auto_tp_sharding, so
test_row_linear[2-unbalanced] (hidden=15) and test_column_linear
[2-unbalanced] (hidden=127) no longer hit the divisibility assert.
The pre-existing tests still expected an AssertionError on the
odd branch, producing "Failed: DID NOT RAISE" in pre-merge CI.
Unconditionally assert all ranks return True.

Signed-off-by: handongl <handongl@nvidia.com>
@trtllm-agent
trtllm-agent requested a review from a team as a code owner July 24, 2026 16:59
@coderabbitai

coderabbitai Bot commented Jul 24, 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: 8a29dc41-f1c6-4ee5-a50a-e62d27f896ee

📥 Commits

Reviewing files that changed from the base of the PR and between 021b435 and 77df102.

📒 Files selected for processing (1)
  • tests/unittest/_torch/multi_gpu/test_linear.py

Walkthrough

The multi-GPU column and row linear tests now unconditionally require all returned results to be True, including for odd hidden_size values.

Changes

Linear test expectations

Layer / File(s) Summary
Unconditional linear result assertions
tests/unittest/_torch/multi_gpu/test_linear.py
test_column_linear and test_row_linear no longer expect AssertionError for odd hidden_size values and instead assert every result is True.

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

Possibly related PRs

Suggested reviewers: lori-ren

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the test-only bug fix and includes the required bug ID and fix type.
Description check ✅ Passed The description has Summary, Test plan, and Links, which covers the template's main required sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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.

2 participants