Skip to content

reable xpu, broken by gptq and setuptool upgrade #1988

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

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

sywangyi
Copy link
Contributor

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@sywangyi
Copy link
Contributor Author

@Narsil please help review. xpu is broken by setuptools upgrade to 70.0.0 and gptq since triton is not supported in xpu yet.

@sywangyi
Copy link
Contributor Author

@yao-matrix

@sywangyi
Copy link
Contributor Author

sywangyi commented Jun 3, 2024

@Narsil please help review and merge it. Then, I need to rebase #1936

@Narsil
Copy link
Collaborator

Narsil commented Jun 3, 2024

Also for the requirements_intel.txt We're using pyproject.toml as a root source.

@Narsil
Copy link
Collaborator

Narsil commented Jun 3, 2024

@Narsil
Copy link
Collaborator

Narsil commented Jun 3, 2024

What is the problem with the newer setuptools ?

@sywangyi
Copy link
Contributor Author

sywangyi commented Jun 3, 2024

with setuptools 70.0.0, import intel_extension_for_pytorch will raise error and make xpu not work

import intel_extension_for_pytorch
/usr/local/lib/python3.10/dist-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: 'libpng16.so.16: cannot open shared object file: No such file or directory'If you don't plan on using image functionality from torchvision.io, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have libjpeg or libpng installed before building torchvision from source?
warn(
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_pytorch/init.py", line 111, in
from . import xpu
File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_pytorch/xpu/init.py", line 27, in
from .cpp_extension import *
File "/usr/local/lib/python3.10/dist-packages/intel_extension_for_pytorch/xpu/cpp_extension.py", line 16, in
from torch.utils.cpp_extension import _TORCH_PATH
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 28, in
from pkg_resources import packaging # type: ignore[attr-defined]
ImportError: cannot import name 'packaging' from 'pkg_resources' (/usr/local/lib/python3.10/dist-packages/pkg_resources/init.py)

@sywangyi
Copy link
Contributor Author

sywangyi commented Jun 3, 2024

we will try to fix the issue in next ipex release. but to make xpu work now. need to downgrade setuptools to 69.5.1

@sywangyi
Copy link
Contributor Author

sywangyi commented Jun 3, 2024

how could I only downgrade setuptools? others are same with requirements_cuda.txt

@Narsil
Copy link
Collaborator

Narsil commented Jun 3, 2024

Let's merge this as-is if temporary, follow-up solution is just to export the dependencies.

We may add hardware specific parts of the dependencies later.

@Narsil Narsil merged commit d1d724b into huggingface:main Jun 3, 2024
@sywangyi sywangyi deleted the xpu_fix branch June 5, 2024 00:36
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

Successfully merging this pull request may close these issues.

2 participants