Skip to content

Commit

Permalink
Fix no-torch pipeline by not erroring out with cpu as new default acc…
Browse files Browse the repository at this point in the history
…elerator
  • Loading branch information
loadams committed Dec 18, 2024
1 parent 2f32966 commit e5f0db2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/no-torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflow_dispatch:
pull_request:
paths:
- 'accelerator/**'
- '.github/workflows/no-torch.yml'
- 'op_builder/**'
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 e5f0db2

Please sign in to comment.