intel / intel-extension-for-deepspeed

Intel® Extension for DeepSpeed* is an extension to DeepSpeed that brings feature support with SYCL kernels on Intel GPU(XPU) device. Note XPU is already supported in stock DeepSpeed (upstream).
MIT License
56 stars 19 forks source link

, in get_accelerator ds_accelerator = XPU_Accelerator() TypeError: Can't instantiate abstract class XPU_Accelerator with abstract methods #81

Closed uniartisan closed 2 months ago

uniartisan commented 3 months ago

I am using pytorch lighting and deepspeed and got the following error. Is there any way to fix it?

"/home/lzy/miniconda3/envs/pytorch/lib/python3.10/site-packages/deepspeed/accelerator/real_accelerator.py", line 184, in get_accelerator
    ds_accelerator = XPU_Accelerator()
TypeError: Can't instantiate abstract class XPU_Accelerator with abstract methods available_memory, capture_to_graph, create_graph, export_envs, handles_memory_backpressure, is_pinned, is_triton_supported, replay_graph, resolves_data_dependency, set_visible_devices_envs, supported_dtypes, use_host_timers, visible_devices_envs
$ pip list
Package                       Version
----------------------------- ----------------------
aiofiles                      23.2.1
aiohttp                       3.9.5
aiosignal                     1.3.1
altair                        5.3.0
annotated-types               0.7.0
anyio                         4.3.0
asttokens                     2.4.1
async-timeout                 4.0.3
attrs                         23.2.0
blinker                       1.8.2
certifi                       2024.2.2
charset-normalizer            3.3.2
click                         8.1.7
colorama                      0.4.6
coloredlogs                   15.0.1
comm                          0.2.2
contourpy                     1.2.1
cycler                        0.12.1
datasets                      2.19.1
debugpy                       1.6.7
decorator                     5.1.1
deepspeed                     0.14.2
dill                          0.3.8
dnspython                     2.6.1
docker-pycreds                0.4.0
email_validator               2.1.1
exceptiongroup                1.2.0
executing                     2.0.1
fastapi                       0.111.0
fastapi-cli                   0.0.4
ffmpy                         0.3.2
filelock                      3.14.0
Flask                         3.0.3
flatbuffers                   24.3.25
fonttools                     4.51.0
frozenlist                    1.4.1
fsspec                        2024.3.1
gitdb                         4.0.11
GitPython                     3.1.43
gradio                        4.31.5
gradio_client                 0.16.4
h11                           0.14.0
hjson                         3.1.0
httpcore                      1.0.5
httptools                     0.6.1
httpx                         0.27.0
huggingface-hub               0.23.1
humanfriendly                 10.0
icecream                      2.1.3
idna                          3.7
importlib_metadata            7.1.0
importlib_resources           6.4.0
intel-extension-for-deepspeed 0.9.4
intel-extension-for-pytorch   2.1.30+xpu
ipykernel                     6.29.3
ipython                       8.24.0
itsdangerous                  2.2.0
jedi                          0.19.1
Jinja2                        3.1.4
jsonschema                    4.22.0
jsonschema-specifications     2023.12.1
jupyter_client                8.6.2
jupyter_core                  5.7.2
kiwisolver                    1.4.5
lightning                     2.2.5
lightning-utilities           0.11.2
markdown-it-py                3.0.0
MarkupSafe                    2.1.5
matplotlib                    3.9.0
matplotlib-inline             0.1.7
mdurl                         0.1.2
mpmath                        1.3.0
multidict                     6.0.5
multiprocess                  0.70.16
nest_asyncio                  1.6.0
networkx                      3.3
ninja                         1.11.1.1
numpy                         1.26.4
oneccl-bind-pt                2.1.300+xpu
onnx                          1.16.0
onnxruntime                   1.18.0
onnxsim                       0.4.36
optimum                       1.19.2
orjson                        3.10.3
packaging                     24.0
pandas                        2.2.2
parso                         0.8.4
pexpect                       4.9.0
pickleshare                   0.7.5
pillow                        10.3.0
pip                           24.0
platformdirs                  4.2.2
prompt-toolkit                3.0.42
protobuf                      4.25.3
psutil                        5.9.8
ptyprocess                    0.7.0
pure-eval                     0.2.2
py-cpuinfo                    9.0.0
pyarrow                       16.1.0
pyarrow-hotfix                0.6
pydantic                      2.7.1
pydantic_core                 2.18.2
pydub                         0.25.1
Pygments                      2.18.0
pynvml                        11.5.0
pyparsing                     3.1.2
python-dateutil               2.9.0
python-dotenv                 1.0.1
python-multipart              0.0.9
pytorch-lightning             2.2.5
pytz                          2024.1
PyYAML                        6.0.1
pyzmq                         25.1.2
referencing                   0.35.1
regex                         2024.5.15
requests                      2.32.2
rich                          13.7.1
rpds-py                       0.18.1
ruff                          0.4.5
safetensors                   0.4.3
semantic-version              2.10.0
sentencepiece                 0.2.0
sentry-sdk                    2.3.1
setproctitle                  1.3.3
setuptools                    69.5.1
shellingham                   1.5.4
six                           1.16.0
smmap                         5.0.1
sniffio                       1.3.1
stack-data                    0.6.2
starlette                     0.37.2
sympy                         1.12
tokenizers                    0.19.1
tomlkit                       0.12.0
toolz                         0.12.1
torch                         2.1.0.post2+cxx11.abi
torchaudio                    2.1.0.post2+cxx11.abi
torchmetrics                  1.4.0.post0
torchvision                   0.16.0.post2+cxx11.abi
tornado                       6.4
tqdm                          4.66.4
traitlets                     5.14.3
transformers                  4.40.2
typer                         0.12.3
typing_extensions             4.11.0
tzdata                        2024.1
ujson                         5.10.0
urllib3                       2.2.1
uvicorn                       0.29.0
uvloop                        0.19.0
wandb                         0.17.0
watchfiles                    0.21.0
wcwidth                       0.2.13
websockets                    11.0.3
Werkzeug                      3.0.3
wheel                         0.43.0
xxhash                        3.4.1
yarl                          1.9.4
zipp                          3.17.0
rogerxfeng8 commented 3 months ago

PyTorch lightning support in IPEX is still ongoing. Please check the discussion in this thread: https://github.com/intel/intel-extension-for-pytorch/issues/658