Open BA8F0D39 opened 1 year ago
Adding to this: this seems to happen because various libs are missing in all of the stable release torchvision Intel® Extension for PyTorch* v1.13.10+xpu wheels.
This is not limited to the image.so lib, the whole torchvision.libs directory is missing. Transplanting these libs from regular cpu torchvision wheels does not yield a working version of torchvision.
In its current state torchvision wheels seem to be broken and cannot be used.
Here is a workaround that works for me under ubuntu 22.04. Hopefully Intel releases a working version soon.
# setup conda build env
conda create --prefix=./ipex_build python==3.10 -y
conda activate ./ipex_build
# checkout torchvision and switch to appropriate version
git clone https://github.com/pytorch/vision.git
cd vision
git checkout v0.14.0
# set some build vars
export GLIBCXX_USE_CXX11_ABI=1
export USE_CUDA=0
# install some dependancies
conda install -y -c conda-forge libpng jpeg ffmpeg
pip install pillow-simd
pip install https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_stable/xpu/torch-1.13.0a0%2Bgitb1dde16-cp310-cp310-linux_x86_64.whl
# generate fresh wheels
python setup.py bdist_wheel
Now go to vision/dist
and you have made yourself some fresh (hopefully) working wheels that can be installed through pip.
@WeizhuoZhang-intel
@Sikerdebaard Thanks. Did they just delete the libraries so that they don't give any errors?
I installed pytorch using the instruction given in the readme python -m pip install torch==2.0.1a0 torchvision==0.15.2a0 intel_extension_for_pytorch==2.0.110+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
This warning is produced when torch is loaded.
import torch
import intel_extension_for_pytorch as ipex
print(ipex.xpu.get_device_name(0))
UserWarning: Failed to load image Python extension: ''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?
What steps should I take correct this?
Using the docker image https://github.com/intel/intel-extension-for-pytorch/tree/v1.13.10%2Bxpu/docker
Reading an image gives an error