[https://nvbugs/6336801][fix] Fix attention op sync test - #15956
Conversation
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
|
/bot run --disable-fail-fast |
📝 WalkthroughWalkthroughThis change extends allowlists used to verify thop.attention kwarg mapping by adding an excluded field (skip_mla_rope_generation) and two aliased fields (skip_softmax_threshold_scale_factor_decode/prefill). It also removes a skip marker gating attention op sync tests, enabling them to run. ChangesAttention Kwarg Allowlist and Test Re-enablement
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/_torch/attention/test_attention_op_sync.py (1)
87-88: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winSkip marker removal restores intended test coverage.
Removing
_THOP_SYNC_NVBUGand its decorator re-enablestest_attr_kwarg_names_match_source_leaf_attrs_except_allowlisted_aliasesandtest_every_forward_args_field_is_consumed, restoring coverage for the thop kwarg/source alias contract and the forward-args consumption contract. This aligns with the PR's stated goal of fixing NVBug 6336801 without a correspondingwaives.txtentry.As per path instructions, this restores sufficient coverage for the affected kwarg-mapping and field-consumption checks; no additional test files appear necessary for this cohort.
Also applies to: 465-466, 566-576
🤖 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/_torch/attention/test_attention_op_sync.py` around lines 87 - 88, Remove the `_THOP_SYNC_NVBUG` skip marker and its decorator from the affected attention op sync tests so `test_attr_kwarg_names_match_source_leaf_attrs_except_allowlisted_aliases` and `test_every_forward_args_field_is_consumed` run again; use the existing symbols in `test_attention_op_sync.py` around `_HEADER` and the skipped test definitions to locate the block, and keep the test coverage aligned with the thop kwarg/source alias and forward-args consumption contracts.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/_torch/attention/test_attention_op_sync.py`:
- Around line 87-88: Remove the `_THOP_SYNC_NVBUG` skip marker and its decorator
from the affected attention op sync tests so
`test_attr_kwarg_names_match_source_leaf_attrs_except_allowlisted_aliases` and
`test_every_forward_args_field_is_consumed` run again; use the existing symbols
in `test_attention_op_sync.py` around `_HEADER` and the skipped test definitions
to locate the block, and keep the test coverage aligned with the thop
kwarg/source alias and forward-args consumption contracts.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: ea542267-23c7-49f7-bfd6-09fdb4383dd1
📒 Files selected for processing (2)
tensorrt_llm/_torch/attention_backend/fmha/fallback.pytests/unittest/_torch/attention/test_attention_op_sync.py
|
PR_Github #57677 [ run ] triggered by Bot. Commit: |
|
PR_Github #57677 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #57718 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
|
PR_Github #57735 [ run ] triggered by Bot. Commit: |
|
PR_Github #57718 [ run ] completed with state |
|
PR_Github #57735 [ run ] completed with state |
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Summary by CodeRabbit
Description
Fix the attention op synchronization tests tracked by https://nvbugs/6336801.
skip_mla_rope_generationfrom the THOP call-site check becauseTrtllmAttention.forwardconsumes this test-only MLA option before the fallback call.The current
waives.txthas no entry for NVBug 6336801; the remaining waiver was the in-file skip marker removed by this change.Test Coverage
tests/unittest/_torch/attention/test_attention_op_sync.py: 8 passedPR Checklist
GitHub Bot Help
The requested CI command will be posted after the PR is created.