Skip to content

perf(fsdp): skip deterministic NaN fill in moves; fix reference worker PYTHONPATH - #269

Merged
Rockdu merged 2 commits into
fsdp-followups/4-cleanupfrom
fsdp-followups/5-tests-infra
Oct 4, 2026
Merged

Rockdu merged 2 commits into
fsdp-followups/4-cleanupfrom
fsdp-followups/5-tests-infra

Conversation

@Rockdu

@Rockdu Rockdu commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Stack 5/9 of follow-ups to #263: main ← #265 ← #266 ← #267 ← #268 ← this ← #271 ← #272 ← #273 ← #274.

What

  • The GPU reference-model test puts the repository root on its worker's PYTHONPATH, so it also runs outside CI (the worker imports the CPU test's harness from tests). refactor(lora): one plain PEFT adapter directory per component #274 keeps the caller's PYTHONPATH behind it instead of replacing it.
  • Model and optimizer moves turn off deterministic mode's NaN fill of uninitialized memory while they run: every tensor they allocate is overwritten by its copy, so the fill only cost time. The saving has not been measured on its own.

Not in this PR

  • sleep_wake.py still reads the singular FSDPState._fsdp_param_group. The plural _fsdp_param_groups exists only from torch 2.12, and the repo pins torch 2.11 (the Wan2.2 param-dtype patch refuses other versions), so the switch belongs to the torch upgrade.

Files

  • miles/backends/fsdp_utils/sleep_wake.py: _skip_uninitialized_memory_fill.
  • tests/fast-gpu/backends/fsdp_utils/test_reference_models.py: worker PYTHONPATH.

Checklist

  • pre-commit run --all-files passes — not run locally
  • Added/updated tests for new behaviour — no new test; e2e standards verify the deterministic runs are unchanged
  • pytest -x is green — GPU tests run in CI only
  • If launch flags changed, python3 train.py --help still parses — n/a
  • If a public flag was added, it appears in the CLI reference docs — n/a
  • If an example was added, it has a real walkthrough — n/a

@Rockdu Rockdu added the run-ci-basic Authorize and run only basic unlabeled CI tests label Sep 27, 2026
@Rockdu
Rockdu force-pushed the fsdp-followups/5-tests-infra branch from b3d0324 to de4c4db Compare September 27, 2026 11:07
@Rockdu
Rockdu force-pushed the fsdp-followups/5-tests-infra branch 2 times, most recently from d7ff482 to d6e2358 Compare September 27, 2026 11:26
@Rockdu
Rockdu force-pushed the fsdp-followups/5-tests-infra branch from d6e2358 to f005e0a Compare September 27, 2026 13:06
@Rockdu
Rockdu added this pull request to stack #270 September 27, 2026 17:59
@Rockdu
Rockdu force-pushed the fsdp-followups/5-tests-infra branch from f005e0a to 36317f3 Compare September 27, 2026 18:10
@Rockdu Rockdu added the run-ci-e2e Run e2e metric-regression tests on this PR label Sep 27, 2026
@Rockdu
Rockdu force-pushed the fsdp-followups/5-tests-infra branch from 36317f3 to f31f045 Compare September 27, 2026 18:25
@Rockdu
Rockdu force-pushed the fsdp-followups/5-tests-infra branch 2 times, most recently from 2a4ce58 to e682e56 Compare September 27, 2026 19:09
@Rockdu
Rockdu force-pushed the fsdp-followups/5-tests-infra branch from e682e56 to 84130a5 Compare September 27, 2026 19:39
@Rockdu Rockdu mentioned this pull request Sep 28, 2026
1 of 6 tasks
@Rockdu Rockdu changed the title perf(offload): skip deterministic NaN fill in moves; fix reference worker PYTHONPATH perf(fsdp): skip deterministic NaN fill in moves; fix reference worker PYTHONPATH Sep 29, 2026
@Rockdu
Rockdu merged commit 0cf06c4 into main Oct 4, 2026
50 of 53 checks passed
OnePunchMonk pushed a commit to OnePunchMonk/miles_diffusion that referenced this pull request Oct 5, 2026
…r PYTHONPATH (radixark#269)

* test(fsdp): put the repository root on the reference worker's PYTHONPATH

* perf(fsdp): skip deterministic mode's NaN fill for tensors a move overwrites
OnePunchMonk pushed a commit to OnePunchMonk/miles_diffusion that referenced this pull request Oct 5, 2026
OnePunchMonk pushed a commit to OnePunchMonk/miles_diffusion that referenced this pull request Oct 5, 2026
…r PYTHONPATH (radixark#269)

* test(fsdp): put the repository root on the reference worker's PYTHONPATH

* perf(fsdp): skip deterministic mode's NaN fill for tensors a move overwrites
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci-basic Authorize and run only basic unlabeled CI tests run-ci-e2e Run e2e metric-regression tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants