Skip to content

Commit

Permalink
Fixes for RTD build errors (#606)
Browse files Browse the repository at this point in the history
Co-authored-by: Shaden Smith <Shaden.Smith@microsoft.com>
  • Loading branch information
jeffra and Shaden Smith committed Dec 15, 2020
1 parent 007466e commit 6380ee3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
8 changes: 6 additions & 2 deletions deepspeed/git_version_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
# This is populated by setup.py
from .git_version_info_installed import *
except ModuleNotFoundError:
# Will be missing from checkouts that haven't been installed (e.g., readthedocs)
version = open('version.txt', 'r').read().strip()
import os
if os.path.isfile('version.txt'):
# Will be missing from checkouts that haven't been installed (e.g., readthedocs)
version = open('version.txt', 'r').read().strip()
else:
version = "0.0.0"
git_hash = '[none]'
git_branch = '[none]'

Expand Down
4 changes: 2 additions & 2 deletions deepspeed/ops/sparse_attention/softmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ class Softmax:
For more details about sparsity config, please see `Generative Modeling with Sparse Transformers`: https://arxiv.org/abs/1904.10509
"""

sparse_softmax = _sparse_softmax.apply
def sparse_softmax(*args, **kwargs):
return _sparse_softmax.apply(*args, **kwargs)

def make_lut(self, device):
"""Generates the sparsity layout used in block-sparse softmax
Expand Down
2 changes: 1 addition & 1 deletion docs/code-docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@

autoclass_content = 'both'

autodoc_mock_imports = ["torch", "apex", "mpi4py", "tensorboardX", "numpy"]
autodoc_mock_imports = ["torch", "apex", "mpi4py", "tensorboardX", "numpy", "cupy"]
1 change: 0 additions & 1 deletion requirements/requirements-readthedocs.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
tqdm
psutil

0 comments on commit 6380ee3

Please sign in to comment.