Skip to content

Remove stale step() docstring from DeepSpeedCPUAdam - #8011

Merged
tohtana merged 2 commits into
deepspeedai:masterfrom
lucaspirola:fix/cpu-adam-stale-step-docstring
May 19, 2026
Merged

Remove stale step() docstring from DeepSpeedCPUAdam#8011
tohtana merged 2 commits into
deepspeedai:masterfrom
lucaspirola:fix/cpu-adam-stale-step-docstring

Conversation

@lucaspirola

Copy link
Copy Markdown
Contributor

What

Removes an obsolete paragraph from the DeepSpeedCPUAdam constructor docstring.

Why

The docstring described a step() option that "updates optimizer states and
copies the parameters back to GPU at the same time" — the old adam_update_copy
kernel, invoked via step(fp16_param_groups=...). That fused-copy path no longer
exists in the codebase:

  • csrc/adam/cpu_adam.cpp binds only adam_update (no adam_update_copy).
  • DeepSpeedCPUAdam.step() / step_subgroup() take no fp16_param_groups
    argument and only call adam_update.

So the "two options" text is stale and misleading to anyone reading the API.
Docstring-only change; no functional impact.

🤖 Generated with Claude Code

The constructor docstring described a step() option that "updates optimizer
states and copies the parameters back to GPU at the same time" -- the old
adam_update_copy kernel invoked via step(fp16_param_groups=...). That fused
-copy path no longer exists: csrc/adam/cpu_adam.cpp binds only adam_update,
and step()/step_subgroup() take no such argument. Drop the obsolete text.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Lucas Pirola <lucas@pirola.eu>
@lucaspirola
lucaspirola requested a review from tohtana as a code owner May 17, 2026 19:54

@tohtana tohtana 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.

Thank you for updating the old doc, @lucaspirola!

@tohtana
tohtana enabled auto-merge (squash) May 19, 2026 17:02
@tohtana
tohtana merged commit ae07514 into deepspeedai:master May 19, 2026
1 check passed
frozenleaves pushed a commit to frozenleaves/DeepSpeed that referenced this pull request Jun 8, 2026
## What

Removes an obsolete paragraph from the `DeepSpeedCPUAdam` constructor
docstring.

## Why

The docstring described a `step()` option that "updates optimizer states
and
copies the parameters back to GPU at the same time" — the old
`adam_update_copy`
kernel, invoked via `step(fp16_param_groups=...)`. That fused-copy path
no longer
exists in the codebase:

- `csrc/adam/cpu_adam.cpp` binds only `adam_update` (no
`adam_update_copy`).
- `DeepSpeedCPUAdam.step()` / `step_subgroup()` take no
`fp16_param_groups`
  argument and only call `adam_update`.

So the "two options" text is stale and misleading to anyone reading the
API.
Docstring-only change; no functional impact.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Lucas Pirola <lucas@pirola.eu>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
nathon-lee pushed a commit to nathon-lee/DeepSpeed_woo that referenced this pull request Jul 1, 2026
## What

Removes an obsolete paragraph from the `DeepSpeedCPUAdam` constructor
docstring.

## Why

The docstring described a `step()` option that "updates optimizer states
and
copies the parameters back to GPU at the same time" — the old
`adam_update_copy`
kernel, invoked via `step(fp16_param_groups=...)`. That fused-copy path
no longer
exists in the codebase:

- `csrc/adam/cpu_adam.cpp` binds only `adam_update` (no
`adam_update_copy`).
- `DeepSpeedCPUAdam.step()` / `step_subgroup()` take no
`fp16_param_groups`
  argument and only call `adam_update`.

So the "two options" text is stale and misleading to anyone reading the
API.
Docstring-only change; no functional impact.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Lucas Pirola <lucas@pirola.eu>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: nathon-lee <leejianwoo@gmail.com>
nathon-lee pushed a commit to nathon-lee/DeepSpeed_woo that referenced this pull request Jul 1, 2026
## What

Removes an obsolete paragraph from the `DeepSpeedCPUAdam` constructor
docstring.

## Why

The docstring described a `step()` option that "updates optimizer states
and
copies the parameters back to GPU at the same time" — the old
`adam_update_copy`
kernel, invoked via `step(fp16_param_groups=...)`. That fused-copy path
no longer
exists in the codebase:

- `csrc/adam/cpu_adam.cpp` binds only `adam_update` (no
`adam_update_copy`).
- `DeepSpeedCPUAdam.step()` / `step_subgroup()` take no
`fp16_param_groups`
  argument and only call `adam_update`.

So the "two options" text is stale and misleading to anyone reading the
API.
Docstring-only change; no functional impact.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Lucas Pirola <lucas@pirola.eu>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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