Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix torch import causing release build failure #4468

Merged
merged 1 commit into from
Oct 9, 2023
Merged
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
2 changes: 1 addition & 1 deletion op_builder/async_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import distutils.spawn
import subprocess
import torch

from .builder import OpBuilder

Expand Down Expand Up @@ -36,6 +35,7 @@ def cxx_args(self):
# -O0 for improved debugging, since performance is bound by I/O
CPU_ARCH = self.cpu_arch()
SIMD_WIDTH = self.simd_width()
import torch # Keep this import here to avoid errors when building DeepSpeed wheel without torch installed
TORCH_MAJOR, TORCH_MINOR = map(int, torch.__version__.split('.')[0:2])
if TORCH_MAJOR >= 2 and TORCH_MINOR >= 1:
CPP_STD = '-std=c++17'
Expand Down