Skip to content

[feat] Select Wan DMD2 activation layouts by complete-step benchmarks - #2120

Open
Gxj230958 wants to merge 3 commits into
hao-ai-lab:mainfrom
Gxj230958:feat/dmd2-joint-shortlist
Open

Gxj230958 wants to merge 3 commits into
hao-ai-lab:mainfrom
Gxj230958:feat/dmd2-joint-shortlist

Conversation

@Gxj230958

Copy link
Copy Markdown
Contributor

Summary

Add an optional benchmark-driven selector for single-rank, 30-block Wan DMD2 training. It evaluates each uniform student/critic layout against the profile's per-event allocated-memory constraints, runs the feasible shortlist in fresh benchmark processes, and selects the lowest measured mean among layouts that also meet the observed budget. The matrix records model feasibility, observed peaks, timing ranges and the winner. The CLI checks the exact block positions returned by the executor.

Depends on #2055 for the DMD2 profiler, benchmark and profile format. This draft targets main with only the selector, usage guide and CPU regressions. It can be merged after #2055.

Measurements

At 17 frames and 54 GiB on Ascend 910B2C, 54 of 56 layouts passed the event model. The reduced grid contained 18 feasible layouts. Cosmos tuning selected 24 student and 16 critic saves. Three fresh hiker evaluation processes averaged 1300.42 ms per complete update at 53.142 GiB peak allocated. The additive solver in #2055 averaged 2757.26 ms and the tuned manual layout averaged 1318.19 ms under the same evaluation protocol. Tuning costs are separate from evaluation step times. Experiment report.

Validation

  • Three CPU tests cover event-wise filtering, uniform positions, measured budget violations, and rejection of a returned layout with the right save counts but different positions.
  • Replaying the 18 archived candidate records reproduced the full 56-row matrix and winner.
  • Ran the selector's measurement path against the [feat] Plan Wan activation policies from measured memory budgets #2055 executor on an idle 910B2C with uniform 24+16, two warmups and five timed updates. The returned block maps matched and the peak was 53.142 GiB.
  • Local tests used the research environment's torch 2.9 MiniMax import workaround. Changed-file pre-commit completed.

@mergify

mergify Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 1 of 1 protections blocking · waiting on 👀 reviews and 🤖 CI

Protection Waiting on
🔴 PR merge requirements 👀 reviews and 🤖 CI

🔴 PR merge requirements

Waiting for

  • #approved-reviews-by>=1
  • check-success=fastcheck-passed
  • check-success=full-suite-passed
This rule is failing.
  • #approved-reviews-by>=1
  • check-success=fastcheck-passed
  • check-success=full-suite-passed
  • check-success~=pre-commit
  • title~=(?i)^\[(feat|feature|bugfix|fix|refactor|perf|ci|doc|docs|misc|chore|kernel|new.?model|skill|skills|infra)\]

@mergify mergify Bot added type: feat New feature or capability scope: training Training pipeline, methods, configs scope: infra CI, tests, Docker, build labels Nov 23, 2026
@Gxj230958
Gxj230958 marked this pull request as ready for review November 23, 2026 04:52
@mergify

mergify Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

@fv-superagent fv-superagent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fv-superagent score: 4/5

Intake at head a7b68d80b. Small, self-contained addition: the docs page, the layout selector and a CPU test for the shortlist and winner selection. The selector's budget check covers both events per candidate and the CLI re-checks the measured block positions against the profiled layout — that guard is the part that makes the benchmark trustworthy.

  • This depends on #2055 (the DMD2 profiler and profile format), so it cannot land before that PR.
  • Nit: joint_layouts.md links PROJECT_REPORT.md on a personal fork at a pinned commit. That file can disappear with the fork; put the report in this repo or drop the link.
  • Nit: the test reaches the script via parents[4]; fine for a regression, but the path breaks if the example moves.

— fv-superagent · 56 layouts enter, one budget leaves · run by aryan5v

@Gxj230958

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

queue

☑️ Command disallowed due to command restrictions in the Mergify configuration.

Details
  • sender-permission >= write

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The reviewed changes appear safe to merge after the declared dependency on #2055 is satisfied.

Summary

Adds a benchmark-based selector for 30-block Wan DMD2 layouts.

  • Operators can pick a Wan DMD2 save layout from memory-filtered benchmarks.

Both previous findings are addressed. No new actionable issues were found. The selector still depends on #2055, as stated in the PR description.

Reviews (2) · Last reviewed commit: "[fix] Continue DMD2 tuning after a candi..." · Reviewed by Greptile

@fv-superagent fv-superagent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fv-superagent score: 3/5 (was 4/5)

f647e2da fixes the Greptile P1 correctly: a nonzero benchmark records status/returncode/log and tuning continues, and only observed rows under budget can win. The new CPU case covers it, and the doc matches. Prior nits are addressed.

  • Blocking — the unit lane dies at collection, so none of its 4,320 tests run: fastvideo/tests/train/utils/test_dmd2_shortlist.py:10 does from examples.train.activation_memory import select_joint_plan as selector, which does not resolve in the lane (ModuleNotFoundError: No module named 'examples.train.activation_memory', Interrupted: 1 error during collection). Load the script by path as the other CPU tests do: importlib.util.spec_from_file_location("select_joint_plan", Path(__file__).resolve().parents[4] / "examples/train/activation_memory/select_joint_plan.py") — pattern. Unit Tests job
  • Hard dependency confirmed: measure() runs profile_dmd2.py, which only #2055 adds, so this cannot land before it. #2055 is green and waiting on review.

— fv-superagent · One import error takes down 4,320 tests. Efficiency, of a kind. · run by aryan5v

This branch has not been deployed

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

Labels

scope: infra CI, tests, Docker, build scope: training Training pipeline, methods, configs type: feat New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants