Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
path = _repos/triton-ascend
url = https://gitcode.com/Ascend/triton-ascend.git
branch = main
[submodule "_repos/deepspeed"]
path = _repos/deepspeed
url = https://github.com/deepspeedai/DeepSpeed.git
38 changes: 29 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
# Default -j 1: parallel sphinx workers multiply RSS; cgroup limits (e.g. 2Gi) often OOM-kill (exit 137) without this.
SPHINXOPTS ?= -j 1
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
Expand All @@ -15,7 +16,8 @@ PROJECT_CONFIGS = \
_repos/LLaMA-Factory/docs:sources/LLaMA-Factory \
_repos/ms-swift/docs:sources/ms-swift \
_repos/vllm-ascend/docs/source:sources/vllm-ascend \
_repos/triton-ascend/docs/zh:sources/triton-ascend
_repos/triton-ascend/docs/zh:sources/triton-ascend \
_repos/deepspeed/docs/_tutorials/accelerator-setup-guide.md:sources/deepspeed/quick_start.md \

# Configure all subprojects generated path
GENERATED_DOCS := sources/_generated
Expand Down Expand Up @@ -63,7 +65,15 @@ sync-onnxruntime-doc:
# Initialize submodules (always run to handle empty dirs left by git clone)
init-submodules:
@git submodule sync --recursive
@git submodule update --init --remote
@n=0; \
while [ $$n -lt 3 ]; do \
git submodule update --init --remote && exit 0; \
n=$$((n+1)); \
echo "git submodule update failed (attempt $$n/3), retrying in 8s..."; \
sleep 8; \
done; \
echo "git submodule update failed after 3 attempts"; \
exit 1

# Copy documentation from submodules
copy-docs: init-submodules
Expand All @@ -79,14 +89,24 @@ copy-docs: init-submodules
rel_dst=$$(echo $$config | cut -d: -f2); \
dst="$(GENERATED_DOCS)/$$rel_dst"; \
echo "Copying $$src -> $$dst"; \
rm -rf $$dst; \
mkdir -p $$dst; \
echo "Copying $$src to $$dst"; \
cp -r "$$src"/* "$$dst"/ 2>/dev/null || echo " [WARN] Source directory does not exist or is empty: $$src"; \
rm -rf "$$dst"; \
if [ -f "$$src" ]; then \
mkdir -p "$$(dirname "$$dst")"; \
echo "Copying $$src to $$dst"; \
cp "$$src" "$$dst" || echo " [WARN] Source file missing or copy failed: $$src"; \
elif [ -d "$$src" ]; then \
mkdir -p "$$dst"; \
echo "Copying $$src to $$dst"; \
cp -r "$$src"/* "$$dst"/ 2>/dev/null || echo " [WARN] Source directory does not exist or is empty: $$src"; \
else \
echo " [WARN] Source does not exist: $$src"; \
fi; \
Comment on lines +92 to +103
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

In addition to updating the deepspeed documentation, this adds a single file copy feature.

if [ "$$rel_dst" = "sources/vllm-ascend" ] || [ "$$rel_dst" = "sources/triton-ascend" ]; then \
rm -f "$$dst/index.md" "$$dst/index.rst" "$$dst/index.html" 2>/dev/null || true; \
else \
find "$$dst" -name 'index.*' -delete 2>/dev/null || true; \
if [ -d "$$dst" ]; then \
find "$$dst" -name 'index.*' -delete 2>/dev/null || true; \
fi; \
fi; \
done

Expand All @@ -102,4 +122,4 @@ html dirhtml singlehtml latex pdf: fetch-config copy-docs sync-onnxruntime-doc

# Catch-all target for other Sphinx targets (clean, help, etc.)
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1 change: 1 addition & 0 deletions _repos/deepspeed
Submodule deepspeed added at dc0fd2
4 changes: 3 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.venv', 'README.md']
# _repos: submodule working trees duplicate content already copied to sources/_generated;
# indexing both roughly doubles RSS and OOM-kills low-memory cgroup builds (e.g. 2Gi).
exclude_patterns = ['_build', '_repos', 'Thumbs.db', '.DS_Store', '.venv', 'README.md']
Comment on lines +74 to +76
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Key Changes.



# -- Options for HTML output -------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@
<!-- DeepSpeed -->
<div class="project-card">
<div class="card-top"><div class="card-icon" style="background-image: url('_static/images/deepspeed.png')"></div><h3 class="card-title">DeepSpeed</h3></div>
<p class="card-desc">分布式训练优化库,V0.10.1 版本起支持昇腾。</p>
<div class="card-footer"><a href="https://github.com/microsoft/DeepSpeed">官方链接</a><span class="split">|</span><a href="sources/deepspeed/install.html">安装指南</a><span class="split">|</span>
<a href="sources/deepspeed/quick_start.html">快速上手</a></div>
<p class="card-desc">DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective. </p>
<div class="card-footer"><a href="https://github.com/deepspeedai/DeepSpeed">官方链接</a><span class="split">|</span><a href="sources/_generated/sources/deepspeed/quick_start.html">安装指南</a><span class="split">|</span>
<a href="sources/_generated/sources/deepspeed/quick_start.html">快速上手</a></div>
</div>

<!-- kernels -->
Expand Down
3 changes: 1 addition & 2 deletions sources/deepspeed/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ DeepSpeed
.. toctree::
:maxdepth: 2

install.rst
quick_start.rst
../_generated/sources/deepspeed/quick_start
73 changes: 0 additions & 73 deletions sources/deepspeed/install.rst

This file was deleted.

34 changes: 0 additions & 34 deletions sources/deepspeed/quick_start.rst

This file was deleted.

Loading