Skip to content

[None][test] Fix MLA import path in attention perf harness#16179

Open
ruodil wants to merge 1 commit into
NVIDIA:mainfrom
ruodil:user/ruodil/module-perf-fix-mla-import
Open

[None][test] Fix MLA import path in attention perf harness#16179
ruodil wants to merge 1 commit into
NVIDIA:mainfrom
ruodil:user/ruodil/module-perf-fix-mla-import

Conversation

@ruodil

@ruodil ruodil commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

The DSA builder imported MLA from tensorrt_llm._torch.modules.attention, but the MLA class lives in tensorrt_llm._torch.modules.mla. This made test_dsa_ctx_dispatch fail at collection with ImportError against any wheel. Import MLA from its real module.

Summary by CodeRabbit

  • Bug Fixes
    • Updated the attention performance benchmark to use the correct module path for the DSA execution path, improving consistency and preventing import-related issues.

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

The DSA builder imported MLA from tensorrt_llm._torch.modules.attention,
but the MLA class lives in tensorrt_llm._torch.modules.mla. This made
test_dsa_ctx_dispatch fail at collection with ImportError against any
wheel. Import MLA from its real module.

Signed-off-by: Ruodi Lu <200874449+ruodil@users.noreply.github.com>
@ruodil ruodil self-assigned this Jul 9, 2026
@ruodil

ruodil commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "skip test as just modifying cases"

@coderabbitai

coderabbitai Bot commented Jul 9, 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: 512e03e7-ef5a-46bf-8802-3a3986749db7

📥 Commits

Reviewing files that changed from the base of the PR and between 9a8ec05 and d3becf7.

📒 Files selected for processing (1)
  • tests/microbenchmarks/attention_perf/attention_perf_harness.py

📝 Walkthrough

Walkthrough

The DSA MLA module builder in the attention performance test harness now imports the MLA class from tensorrt_llm._torch.modules.mla instead of tensorrt_llm._torch.modules.attention. This is a single-line import source change with no other logic modifications.

Changes

Import correction

Layer / File(s) Summary
Update MLA import source
tests/microbenchmarks/attention_perf/attention_perf_harness.py
_build_dsa_mla_module switches the MLA class import from tensorrt_llm._torch.modules.attention to tensorrt_llm._torch.modules.mla.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and clearly matches the fix to the MLA import path in the attention perf harness.
Description check ✅ Passed The description explains the issue and fix, but the Test Coverage section is left empty.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58401 [ skip ] triggered by Bot. Commit: d3becf7 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58401 [ skip ] completed with state SUCCESS. Commit: d3becf7
Skipping testing for commit d3becf7

Link to invocation

@ruodil ruodil requested a review from yufeiwu-nv July 9, 2026 07:01
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.

3 participants