Skip to content

Commit

Permalink
Test with skipping no torch import
Browse files Browse the repository at this point in the history
  • Loading branch information
loadams committed Dec 18, 2024
1 parent 338e571 commit 6fd7ddc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/no-torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build deepspeed
run: |
DS_ACCELERATOR="cuda" DS_BUILD_STRING=" " python setup.py sdist
DS_BUILD_STRING=" " python setup.py sdist
- name: Open GitHub issue if nightly CI fails
if: ${{ failure() && (github.event_name == 'schedule') }}
Expand Down
6 changes: 5 additions & 1 deletion accelerator/cpu_accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

# DeepSpeed Team

import torch
from .abstract_accelerator import DeepSpeedAccelerator

try:
import torch
except ImportError as e:
pass

try:
import oneccl_bindings_for_pytorch # noqa: F401 # type: ignore
oneccl_imported_p = True
Expand Down

0 comments on commit 6fd7ddc

Please sign in to comment.