Skip to content

[AutoSP] Fix compiler correctness - #8457

Open
jinyouzhi wants to merge 3 commits into
deepspeedai:masterfrom
jinyouzhi:autosp-correctness
Open

[AutoSP] Fix compiler correctness#8457
jinyouzhi wants to merge 3 commits into
deepspeedai:masterfrom
jinyouzhi:autosp-correctness

Conversation

@jinyouzhi

Copy link
Copy Markdown
Contributor

Summary

  • preserve causal-LM targets across sequence-shard boundaries and aggregate shard losses by valid-token count
  • validate sequence, mesh, and attention-head layouts instead of silently dropping tokens or entering invalid collectives
  • preserve non-default sequence dimensions and reconstruct supported SDPA masks after Ulysses Q/K/V exchange
  • prevent stale AutoSP process-group reuse and fix FPDT GQA backward K/V gradient buffer shapes

Tests

  • pytest -q tests/unit/v1/compile/test_compile_autosp.py -k AutoSPValidation
  • targeted sequential AutoSP graph rewrite tests
  • changed-file pre-commit hooks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jin, Youzhi <youzhi.jin@intel.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a392ba760

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread deepspeed/compile/custom_ops/all_to_all.py Outdated
Comment thread deepspeed/compile/custom_ops/__init__.py
Comment thread deepspeed/compile/passes/sp_compile.py Outdated
jinyouzhi and others added 2 commits September 8, 2026 10:34
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jin, Youzhi <youzhi.jin@intel.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jin, Youzhi <youzhi.jin@intel.com>
@pengdurice

Copy link
Copy Markdown
Contributor

thanks for the PR, will take a closer look later, but can you help add more details of the issues, your fixes, and the test results.

@jinyouzhi

Copy link
Copy Markdown
Contributor Author

thanks for the PR, will take a closer look later, but can you help add more details of the issues, your fixes, and the test results.

Sure, thank you. Will add more details asap.

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.

2 participants