Repository navigation
[TRTLLM-15864][chore] Consolidate the VisualGen attention domain under _torch/visual_gen/attention/ - #20214
Conversation
b71fd4a to
e9c6265
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #77489 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #77555 [ run ] triggered by Bot. Commit: |
|
PR_Github #77555 [ run ] completed with state
|
…r _torch/visual_gen/attention/ Move the VisualGen attention backends and the DiT attention module into one domain package: _torch/visual_gen/attention_backend/ -> _torch/visual_gen/attention/backends/ _torch/visual_gen/modules/attention.py -> _torch/visual_gen/attention/attention.py Relative imports that leave the moved subtree gain one dot for the new depth; modules/__init__.py resolves Attention/QKVMode lazily to avoid an import cycle; CODEOWNERS, the groovy related-file list, docs and comments follow the new paths. No old path is left behind, so git records every move as a rename; forwarding shims follow in a separate change. Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
- Drop the Attention/QKVMode re-export from visual_gen/modules/__init__.py; nothing in the repo imports them from there, and the forwarding for out-of-tree callers belongs with the shims in the follow-up PR. - Restore the Lightricks copyright line in transformer_ltx2.py. - Update the remaining stale references to the old attention_backend path (cute_dsl/fmha.py docstring, blog25 links). Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
bed96f3 to
debb28a
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #77587 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #77623 [ run ] triggered by Bot. Commit: |
|
PR_Github #77587 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #77686 [ run ] triggered by Bot. Commit: |
|
PR_Github #77623 [ run ] completed with state |
|
PR_Github #77686 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #77711 [ run ] triggered by Bot. Commit: |
|
PR_Github #77711 [ run ] completed with state |
Resolve conflicts with upstream NVIDIA#20214, which consolidated the VisualGen attention domain under _torch/visual_gen/attention/: - modules/attention.py moved to attention/attention.py; the PR's changes carry over. The L0_MergeRequest.groovy path filter now points at the new location, and parallel/ stays. - Point the two PR-added imports of the moved module at the new path (parallel/token_sharded_modules.py, test_token_sharded_tp_layout.py). - Keep both new multi-GPU unit tests in l0_cpu.yml. - Feature matrix: keep the token-sharded TP footnote and the SOL-Attn column. Signed-off-by: Chang Liu <9713593+chang-l@users.noreply.github.com>
|
shim PR:#20215 |
Description
Pure move, mirroring #17968:
tensorrt_llm/_torch/visual_gen/attention_backend/tensorrt_llm/_torch/visual_gen/attention/backends/tensorrt_llm/_torch/visual_gen/modules/attention.pytensorrt_llm/_torch/visual_gen/attention/attention.pyAll references, CODEOWNERS, and the groovy file list are updated.
visual_gen.modulesno longer re-exportsAttention/QKVMode(no in-repo users); #20215 restores it lazily.Forwarding shims for the old paths come in a follow-up PR, because a shim left at the old path in this squash commit would break rename detection and
git blame.Please hold #19751 and #19358 until the shim PR merges. They add files under the old directory.
Test Coverage
Existing VisualGen tests. Locally, against base: every moved file is detected as a rename, the collected test set is identical, and the
l0_cpuVisualGen results are identical.PR Checklist
Dev Engineer Review
The change consolidates VisualGen attention code under
tensorrt_llm/_torch/visual_gen/attention/. It moves the backend package andmodules/attention.py, then updates source imports, documentation, ownership rules, and the Groovy multi-GPU file list to use the new paths.visual_gen.modulesno longer re-exportsAttentionorQKVMode. Callers that import these symbols from that package must update; a lazy compatibility re-export is planned for a follow-up. No forwarding shims are included, so consumers of the old module paths must also update. Review finding counts are unavailable.QA Engineer Review
The change updates existing VisualGen unit-test imports but does not report changes to test functions or test IDs. The PR description reports that the collected test set is unchanged. It also reports identical local
l0_cpuVisualGen results. CI comments report failures in two L0 pipelines but do not identify the failing tests. Coverage verdict: needs follow-up until those failures are understood.Per-File QA Perspective
tensorrt_llm/_torch/visual_gen/attention/attention.py: Verify attention construction and calls after updating backend imports.tensorrt_llm/_torch/visual_gen/attention/backends/**: Verify backend imports and behavior after the package move, especially relative imports in sparse and parallel backends.tensorrt_llm/_torch/visual_gen/modules/__init__.py: Verify callers no longer rely onmodulesre-exportingAttentionorQKVMode.tensorrt_llm/_torch/visual_gen/models/: Verify model imports resolve from the relocated attention modules.tests/unittest/_torch/visual_gen/**: Updated test imports retain existing coverage, including multi-GPU, sparse attention, backend, and integration behavior. Test-list membership is not established by the supplied evidence..github/CODEOWNERS,jenkins/L0_MergeRequest.groovy, and documentation files: These updates align ownership, multi-GPU file selection, and documented paths with the new layout; verify the intended review ownership and CI selection.