Sync 1 diff to facebookresearch/optimizers - #277
Conversation
Summary: Syncs the internal dev tree to the OSS mirror (`fbcode/ai_codesign/optimizers`) via `scripts/oss_sync.sh`. Changes included since the last sync marker: - [shampoo] Newton-Schulz inverse root (D115751122) - [shampoo][dev] Fix OSS mypy on `ShampooPT2CompileConfig`'s synthesized base class (D116658375, below this diff in the stack) - [pyre][automated] Remove unused type error suppressions - hpc (D116361970) **Most of this diff is machine output; two files are not.** The mirrored `.py` files under `distributed_shampoo/` and `gpa/` are regenerated by the script. `CHANGELOG.md` and `distributed_shampoo/__init__.py` were edited by hand — details below. Every bullet in the new `## 2026-08-19` entry was hand-written. The generator emits `<commit title> — <first line of the Summary: section>`, which for these commits produced a link preamble, internal tooling narration, and a sentence truncated mid-clause. The generator produced four bullets; one was dropped. The `cast(torch.Tensor, param)` mypy fix (D113741320) already shipped to the mirror in an earlier sync and reappeared only because that sync left the marker short. Verified against the diff rather than the title: the `distributed_shampoo_test.py` hunks here are all additions for the new Newton-Schulz coverage, with no `cast` lines. The `[pyre][automated]` sweep **does** get a bullet, despite the internal-looking title. It is not internal-only in the mirror: the transform stage rewrites internal `# pyre-ignore` into `# type: ignore`, so the sweep removes 13 `# type: ignore` comments plus a net 2 `# pyrefly: ignore` comments from the public tree. A reader diffing two releases would otherwise find unexplained changes. The bullet keeps the fact and drops the internal framing. `distributed_shampoo/__init__.py` is the one mirror `.py` file `oss_sync.sh` does not regenerate (it is manually maintained, by design). `NewtonSchulzRootInvConfig` was missing from it while the release note advertises the feature, so it is added to the imports and `__all__` alongside its sibling `RootInvConfig` subclasses. No sync stage catches this class of omission — mypy and all four CPU suites pass either way, because nothing in the mirror imports from the package root. Also advances the non-exported last-sync marker at `scripts/.last_oss_sync_rev` to `084ddd3b2798` (D116658375), the newest committed dev-path commit. This covers every commit whose change is in this mirror, so the next sync will not re-list any of them. Differential Revision: D116726514
Summary: Syncs the internal dev tree to the OSS mirror (`fbcode/ai_codesign/optimizers`) via `scripts/oss_sync.sh`. Changes included since the last sync marker: - [shampoo] Add per-head block splitting for attention projections, via two new `DDPDistributedConfig` fields: `head_split_size` and `head_split_param_names`. When `head_split_size > 0`, a matching 2D parameter is split along dim 0 into `head_split_size`-row blocks instead of taking the default merge-and-block path, so a matrix preconditioner (Shampoo or spectral descent) sees one block per attention head rather than the whole fused projection. A parameter is split iff its name contains any substring in `head_split_param_names`; parameters in the same group that do not match keep the default blocking. Opt-in -- `head_split_size` defaults to 0, so the default path is unchanged. Internal revisions: D115233938 **Most of this diff is machine output; one file is not.** The mirrored `.py` files under `distributed_shampoo/` are regenerated by the script. `CHANGELOG.md` was hand-edited: the generator emits `<commit title> -- <first line of the Summary: section>`, and that bullet was replaced with the release note above. No other hand edits. The mirror content is exactly the three source files from the internal revision plus the changelog entry -- `distributor/shampoo_distributor.py`, `distributor/shampoo_ddp_distributor.py`, `shampoo_types.py`, and `CHANGELOG.md` (141 insertions, 15 deletions total). Note on the marker: `scripts/.last_oss_sync_rev` was advanced by the script to the internal revision's commit hash, which is still a draft. Its hash will be rewritten on every amend and again at land, so the next sync will not find it and will need an explicit `--since`. Setting it back to the newest landed commit instead would trade that hard failure for a soft one (the next sync re-lists this revision and generates a duplicate bullet). Flagging rather than hand-editing, since the marker is script-owned. Differential Revision: D116989675
|
@ErstinAn has exported this pull request. If you are a Meta employee, you can view the originating Diff in D116989675. |
|
Hi @ErstinAn! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Summary:
Syncs the internal dev tree to the OSS mirror (
fbcode/ai_codesign/optimizers) viascripts/oss_sync.sh. Changes included since the last sync marker:DDPDistributedConfigfields:head_split_sizeandhead_split_param_names. Whenhead_split_size > 0, a matching 2D parameter is split along dim 0 intohead_split_size-row blocks instead of taking the default merge-and-block path, so a matrix preconditioner (Shampoo or spectral descent) sees one block per attention head rather than the whole fused projection. A parameter is split iff its name contains any substring inhead_split_param_names; parameters in the same group that do not match keep the default blocking. Opt-in --head_split_sizedefaults to 0, so the default path is unchanged.Internal revisions: D115233938
Most of this diff is machine output; one file is not. The mirrored
.pyfiles underdistributed_shampoo/are regenerated by the script.CHANGELOG.mdwas hand-edited: the generator emits<commit title> -- <first line of the Summary: section>, and that bullet was replaced with the release note above. No other hand edits.The mirror content is exactly the three source files from the internal revision plus the changelog entry --
distributor/shampoo_distributor.py,distributor/shampoo_ddp_distributor.py,shampoo_types.py, andCHANGELOG.md(141 insertions, 15 deletions total).Note on the marker:
scripts/.last_oss_sync_revwas advanced by the script to the internal revision's commit hash, which is still a draft. Its hash will be rewritten on every amend and again at land, so the next sync will not find it and will need an explicit--since. Setting it back to the newest landed commit instead would trade that hard failure for a soft one (the next sync re-lists this revision and generates a duplicate bullet). Flagging rather than hand-editing, since the marker is script-owned.Differential Revision: D116989675