Skip to content

DeepSpeed op JIT support - #476

Closed
jeffra wants to merge 64 commits into
masterfrom
jeffra/jit_extensions
Closed

jeffra wants to merge 64 commits into
masterfrom
jeffra/jit_extensions

Conversation

@jeffra

@jeffra jeffra commented Oct 20, 2020 •

Copy link
Copy Markdown
Collaborator
  • Support for both JIT and pre-install ops
  • pip install deepspeed support
  • Converts necessary apex ops into JIT (FusedAdam and flatten/unflatten) and removed apex dependency all together
  • Streamlined ability to add new ops into DeepSpeed
  • Allow for python only install
  • Environment report ds_report reports op install status and compatibility

@jeffra
jeffra requested a review from arashashari as a code owner October 20, 2020 00:03
Comment thread deepspeed/runtime/zero/stage2.py Resolved
Comment thread tests/unit/test_checkpointing.py Resolved
Comment thread op_builder/builder.py
import torch.utils.cpp_extension
cuda_home = torch.utils.cpp_extension.CUDA_HOME
# Ensure there is not a cuda version mismatch between torch and nvcc compiler
output = subprocess.check_output([cuda_home + "/bin/nvcc",

@ShadenSmith ShadenSmith Oct 29, 2020 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This crashes on systems without CUDA installed.

DS_BUILD_OPS=0
Traceback (most recent call last):
  File "setup.py", line 74, in <module>
    assert_no_cuda_mismatch()
  File "/home/shsmit/src/deepspeed/op_builder/builder.py", line 20, in assert_no_cuda_mismatch
    output = subprocess.check_output([cuda_home + "/bin/nvcc",
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Comment thread op_builder/builder.py Outdated
return version_ge_1_1 + version_ge_1_3 + version_ge_1_5

def is_compatible(self):
assert_no_cuda_mismatch()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I totally agree that a version mismatch should be a showstopper when we go to build an op. However, asserting here in the compatibility check seems very aggressive and stops us installing on non-CUDA systems.

@jeffra

jeffra commented Oct 30, 2020

Copy link
Copy Markdown
Collaborator Author

Closed and replaced with #496 which is a squashed and rebased version of this PR.

@jeffra jeffra closed this Oct 30, 2020
@jeffra
jeffra deleted the jeffra/jit_extensions branch November 19, 2020 23:26
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