DeepSpeed
5e97e02c - Code cleaning: Remove unused files and consolidate benchmarks, and documentation (#9144)

Commit
1 day ago
Code cleaning: Remove unused files and consolidate benchmarks, and documentation (#9144) ### 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](https://github.com/deepspeedai/DeepSpeedExamples/pull/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](https://github.com/deepspeedai/DeepSpeed/pull/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](https://github.com/deepspeedai/DeepSpeed/issues/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](https://github.com/deepspeedai/DeepSpeed/issues/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. ### 7. New NVMe/GDS cleanup - Remove the unused `deepspeed_memcpy` export of the `async_io` op, together with its implementation `csrc/aio/py_lib/deepspeed_py_copy.{cpp,h}`, from all five async_io builders (CPU/CUDA, NPU, XPU, KLXPU, SUPA). GDS picks this up through `AsyncIOBuilder.lib_sources()`. - Nothing has ever called it. It arrived with ZeRO-Infinity (#976, 2021), whose swap code already copied with `Tensor.copy_`, and a public GitHub code search finds no Python callers. - It was also unsafe. The 8-vector AVX loop was bounded by a 4-vector round-down, so lengths with an odd number of 4-vector blocks read and wrote up to `4 * SIMD_WIDTH` floats past both tensors. The wrapper also treated every dtype as FP32, copied `size(0)` instead of `numel()` elements, and wrote strided destinations into a discarded temporary. --------- Signed-off-by: Hongwei Chen <hongweichenmail@gmail.com>
Author
Parents
Loading