Skip to content

[https://nvbugs/6550708][fix] Stub _profiler=VisualGenProfiler() in the double (matching the sibling… - #17204

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

[https://nvbugs/6550708][fix] Stub _profiler=VisualGenProfiler() in the double (matching the sibling…#17204
trtllm-agent wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6550708

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: Commit 7e6692a made the shared denoise loop unconditionally dereference self._profiler, assigned only in BasePipeline.__init__, but the Cosmos3 test double builds its pipeline via object.__new__ and so never gets one.
  • Fix: Stub _profiler=VisualGenProfiler() in the double (matching the sibling Qwen-Image helper the same commit fixed) and drop the three orphaned attrs; unscoped the profiler is a no-op, so iteration semantics are unchanged.
  • 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

  • Added VisualGenProfiler to the Cosmos3 denoise test double.
  • Removed obsolete profiling attributes now managed by the profiler.
  • The change matches the Qwen-Image helper and prevents _profiler AttributeError failures.
  • The profiler remains unscoped and preserves denoise iteration behavior.
  • No configuration or test-list files changed.

QA Engineer Review

  • Modified _denoise_ready_pipeline().
  • No test functions were added, modified, or removed.
  • The change supports the existing Cosmos3 denoise tests.
  • No test-list coverage reference was identified.
  • Verdict: sufficient.

The VisualGen profiler refactor moved the denoise loop's window state onto
a VisualGenProfiler held as BasePipeline._profiler, which the shared
denoise() loop now dereferences unconditionally. The Cosmos3 test double
builds its pipeline via object.__new__, skipping __init__, so _profiler
was never created and all four denoise-loop tests raised AttributeError.

Stub the profiler the same way the sibling Qwen-Image double already does,
and drop the three attributes that refactor orphaned (_profile_range,
_predenoise_pending, _postdenoise_pending) -- those now live on the
profiler and nothing reads them off the pipeline.

Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 3, 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: 170a83a0-e3d0-4bb7-8d78-dab109141622

📥 Commits

Reviewing files that changed from the base of the PR and between d8b25c5 and 1810485.

📒 Files selected for processing (1)
  • tests/unittest/_torch/visual_gen/test_cosmos3_distilled.py

Walkthrough

The Cosmos3 distilled test fixture now supplies VisualGenProfiler to the denoise-ready pipeline and removes obsolete manual profiling state.

Changes

Cosmos3 profiler fixture

Layer / File(s) Summary
Denoise profiler fixture wiring
tests/unittest/_torch/visual_gen/test_cosmos3_distilled.py
The fixture imports VisualGenProfiler, passes _profiler=VisualGenProfiler(), and removes manual profiling state attributes.

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

Suggested reviewers: bowenfu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the fix: adding a VisualGenProfiler stub to the Cosmos3 test double.
Description check ✅ Passed The description explains the root cause and fix and includes test coverage, although it omits the template checklist.
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.

@yibinl-nvidia

Copy link
Copy Markdown
Collaborator

closing PR as the change has been merged in ac534c6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants