Skip to content

Regional weather diffusion: torch.compile with domain parallelism - #2211

Draft
coreyjadams wants to merge 3 commits into
dp-06-compile-1986from
dp-07-recipe-compile
Draft

coreyjadams wants to merge 3 commits into
dp-06-compile-1986from
dp-07-recipe-compile

Conversation

@coreyjadams

Copy link
Copy Markdown
Collaborator

PhysicsNeMo Pull Request

Description

Turns on torch.compile for the regional weather diffusion recipe under
domain parallelism, which the recipe previously disabled. Closes #1986 together
with the previous PR.

Validated: test_training -k "lognormal and None" green on 1 GPU and on
2 GPUs (8 passed; the rest skip by world size). The #1986 repro config (DiT,
natten2d_rope, bf16, FSDP2, compiled) trains 20 steps on 4 GPUs (2
data-parallel x domain 2) at ~0.06 s/step after compilation.

apex LayerNorm with compile is not covered (apex was not available to test).

Checklist

Dependencies

Depends on #2210 (ShardTensor compile fixes).

@copy-pr-bot

copy-pr-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS review map

Current for commit dd3846777341. An approval covers every file listed for that owner; one owner is sufficient for shared files.

No CODEOWNER

  • CHANGELOG.md
  • examples/weather/regional_weather_diffusion/test_training.py
  • examples/weather/regional_weather_diffusion/utils/nn.py
  • examples/weather/regional_weather_diffusion/utils/parallel.py
  • examples/weather/regional_weather_diffusion/utils/trainer.py

Comment /codeowners-info to refresh.

@coreyjadams
coreyjadams added this pull request to stack #2212 October 30, 2026 21:45
Compile the loss under ShardTensor too, and pass attention_backend from
the model config to the DiT.
…ensor

- Slice the ddp/domain submeshes once and reuse the objects. Each mesh[...]
  call builds a new, equal DeviceMesh; a compiled graph that meets one it
  does not track emits device_mesh._get_submesh, which Inductor cannot
  lower (pytorch/pytorch#201701).
- test_training runs torch_compile=True too, including with ShardTensor.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant