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

Errors when building Pytorch patch and plugin #42

Open
fengkeyleaf opened this issue Jun 17, 2024 · 1 comment
Open

Errors when building Pytorch patch and plugin #42

fengkeyleaf opened this issue Jun 17, 2024 · 1 comment

Comments

@fengkeyleaf
Copy link

When I built the pytorch patchand plugin, I got the following errors but no errors reported before them:

Error message when building the patch:

(base) sora@fengkeyleaf-rog:~/pytorch$ git apply ~/switchml/dev_root/build/switchml_pytorch.patch
/home/sora/switchml/dev_root/build/switchml_pytorch.patch:50: trailing whitespace.
#The following lines should be filled automatically using the pytorch patch makefile to
error: patch failed: torch/csrc/distributed/c10d/init.cpp:1
error: torch/csrc/distributed/c10d/init.cpp: patch does not apply
error: patch failed: torch/lib/c10d/CMakeLists.txt:1
error: torch/lib/c10d/CMakeLists.txt: patch does not apply
error: patch failed: torch/lib/c10d/ProcessGroupGloo.cpp:1
error: torch/lib/c10d/ProcessGroupGloo.cpp: patch does not apply

Error message when building the plugin:

(/home/sora/switchml/dev_root/frameworks_integration/pytorch_plugin/path_to_env) sora@fengkeyleaf-rog:~/switchml/dev_root/frameworks_integration/pytorch_plugin$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 37, in
from torch.utils import cpp_extension
File "/home/sora/switchml/dev_root/frameworks_integration/pytorch_plugin/path_to_env/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 23, in
from pkg_resources import packaging # type: ignore[attr-defined]
ImportError: cannot import name 'packaging' from 'pkg_resources' (/home/sora/switchml/dev_root/frameworks_integration/pytorch_plugin/path_to_env/lib/python3.8/site-packages/pkg_resources/init.py)

I wonder if there are some ways to solve the problem or anyone else has the same error before? By the way, my OS info:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

@mcanini
Copy link

mcanini commented Jul 16, 2024

We have not updated this code for newer PyTorch versions.
I wonder if you set up your environment with the same dependencies as the system was tested for?

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

No branches or pull requests

2 participants