Skip to content

Commit 6380ee3

Browse files
jeffraShaden Smith
andauthored
Fixes for RTD build errors (deepspeedai#606)
Co-authored-by: Shaden Smith <Shaden.Smith@microsoft.com>
1 parent 007466e commit 6380ee3

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

deepspeed/git_version_info.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
# This is populated by setup.py
33
from .git_version_info_installed import *
44
except ModuleNotFoundError:
5-
# Will be missing from checkouts that haven't been installed (e.g., readthedocs)
6-
version = open('version.txt', 'r').read().strip()
5+
import os
6+
if os.path.isfile('version.txt'):
7+
# Will be missing from checkouts that haven't been installed (e.g., readthedocs)
8+
version = open('version.txt', 'r').read().strip()
9+
else:
10+
version = "0.0.0"
711
git_hash = '[none]'
812
git_branch = '[none]'
913

deepspeed/ops/sparse_attention/softmax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ class Softmax:
224224
225225
For more details about sparsity config, please see `Generative Modeling with Sparse Transformers`: https://arxiv.org/abs/1904.10509
226226
"""
227-
228-
sparse_softmax = _sparse_softmax.apply
227+
def sparse_softmax(*args, **kwargs):
228+
return _sparse_softmax.apply(*args, **kwargs)
229229

230230
def make_lut(self, device):
231231
"""Generates the sparsity layout used in block-sparse softmax

docs/code-docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@
7979

8080
autoclass_content = 'both'
8181

82-
autodoc_mock_imports = ["torch", "apex", "mpi4py", "tensorboardX", "numpy"]
82+
autodoc_mock_imports = ["torch", "apex", "mpi4py", "tensorboardX", "numpy", "cupy"]
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
tqdm
2-
psutil

0 commit comments

Comments
 (0)