Skip to content

Code cleaning: Remove unused files and consolidate benchmarks, and documentation - #9144

Open
hwchen2017 wants to merge 11 commits into
masterfrom
hongwei/unused_file
Open

hwchen2017 wants to merge 11 commits into
masterfrom
hongwei/unused_file

Conversation

@hwchen2017

Copy link
Copy Markdown
Contributor

1. Unused library code

  • Remove the broken DeepSpeedTransformerBase placeholder, legacy BERT injection helper, unused data-routing gather/scatter helpers, TpTrainingManager, and ContiguousMemoryAllocator.
  • Remove the TpTrainingManager package re-export and the HPU workflow path filter for the deleted injection helper.
  • Remove the unreferenced native header csrc/includes/quantizer.h.

2. NVMe/GDS cleanup

  • Remove the legacy csrc/aio/py_test/ benchmark copy and DGX-2 mount/unmount scripts; retain the maintained deepspeed/nvme/ tools.
  • Remove the standalone import/assert validators in csrc/gds/py_test/ and deepspeed/nvme/.

3. Examples and benchmark organization

  • Remove the local SDMA example copy and point the English README, Chinese README, and website news entry to its new location in deepspeedai/DeepSpeedExamples#1025.
  • Move the AutoSP multimodal and pinned-memory transfer benchmarks into tests/benchmarks/.
  • Move three CPU optimizer performance scripts from tests/perf/ into tests/benchmarks/ with descriptive filenames.
  • Consolidate the examples, benchmark, and Azure pointer pages into the root READMEs.

4. Packaging and development configuration

  • Remove the long-broken ds_bench executable and its installation entry. #3157 moved the communication benchmarks to DeepSpeedExamples on 2023-04-07, but left this launcher importing benchmarks.communication. It has therefore been broken in standard DeepSpeed installations for more than three and a half years.
  • Move the pytest_randomly.random_seeder entry point from setup.cfg into setup.py, preserving deepspeed.runtime.utils:set_random_seed.
  • Remove outdated Docker and Conda environment recipes that have not received toolchain refreshes for roughly two to three years.
  • Remove .pylintrc, tests/.coveragerc, empty .gitmodules and CPU requirements files, and the one-off copyright migration script.
  • Remove the blanket *.cuh ignore rule described in #7701, so new CUDA source headers are not silently excluded from git add.

5. Contributor documentation and test invocation

  • Make the root CONTRIBUTING.md the canonical guide; redirect /contributing/ to it using jekyll-redirect-from.
  • Document plain pytest for GPU runs and update make test and the PR-checklist skill consistently, following option 2 in #9075. CPU CI's existing --forked usage is unchanged.
  • Move DCO and Code of Conduct sections to the end of CONTRIBUTING.md and remove duplicate sections from the root READMEs.
  • Remove the installation instructions for the deleted Conda environment.

6. Unreferenced documentation assets

Remove 38 documentation/blog assets (images and a meetup PDF) totaling approximately 12.4 MB, with no retained in-repository references found.

Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T05:23:27.102061Z 4debc79 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Review: #9144

Verified the main risk items against the merge-base. Three notes:

  1. Dockerfiles — via GitHub history, docker/Dockerfile has had no toolchain update since 2023-12 (#4780); gh-builder/* and rocm/ since 2024-11 (#5676). Nothing in CI references them. Probably unused — fine to remove.

  2. --forked — --forked is set per-workflow, not centrally: only the three cpu-torch-* workflows pass it, and they are unchanged in this PR. Every accelerator workflow already runs plain pytest. Dropping it from CONTRIBUTING.md / Makefile / the PR-checklist skill only affects local runs, so this should be fine.

  3. TpTrainingManager — verified unused in both DeepSpeed and HuggingFace. #7806 rewrote deepspeed.tp_model_init() to only record args and moved sharding into DeepSpeedEngine, which left the Manager without a caller. HF transformers (integrations/deepspeed.py) calls tp_model_init, not the Manager. FYI @inkcherry.

@delock

delock commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Review: #9144

Verified the main risk items against the merge-base. Three notes:

  1. Dockerfiles — via GitHub history, docker/Dockerfile has had no toolchain update since 2023-12 (Update dockerfile with updated versions #4780); gh-builder/* and rocm/ since 2024-11 (Switch what versions of python are supported #5676). Nothing in CI references them. Probably unused — fine to remove.
  2. --forked — --forked is set per-workflow, not centrally: only the three cpu-torch-* workflows pass it, and they are unchanged in this PR. Every accelerator workflow already runs plain pytest. Dropping it from CONTRIBUTING.md / Makefile / the PR-checklist skill only affects local runs, so this should be fine.
  3. TpTrainingManager — verified unused in both DeepSpeed and HuggingFace. Support custom partitioning patterns for AutoTP #7806 rewrote deepspeed.tp_model_init() to only record args and moved sharding into DeepSpeedEngine, which left the Manager without a caller. HF transformers (integrations/deepspeed.py) calls tp_model_init, not the Manager. FYI @inkcherry.

Will approve after a day to leave time for other approvers.

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.

2 participants