oneapi-src / oneapi-src/oneAPI-samples
Intel_Extension_For_PyTorch_GettingStarted does work for GPU max
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 745
- PR merge metrics
- No merged PRs in 30d
Description
Error message:
(pytorch) [root@MPVC333 Intel_Extension_For_PyTorch_GettingStarted]# python Intel_Extension_For_PyTorch_Hello_World.py
Traceback (most recent call last):
File "/home/frank/oneAPI-samples/AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_PyTorch_GettingStarted/Intel_Extension_For_PyTorch_Hello_World.py", line 15, in
import intel_extension_for_pytorch as ipex
File "/root/miniconda3/envs/pytorch/lib/python3.9/site-packages/intel_extension_for_pytorch/init.py", line 2, in
from . import cpu
File "/root/miniconda3/envs/pytorch/lib/python3.9/site-packages/intel_extension_for_pytorch/cpu/init.py", line 2, in
from . import runtime
File "/root/miniconda3/envs/pytorch/lib/python3.9/site-packages/intel_extension_for_pytorch/cpu/runtime/init.py", line 3, in
from .multi_stream import MultiStreamModule, get_default_num_streams,
File "/root/miniconda3/envs/pytorch/lib/python3.9/site-packages/intel_extension_for_pytorch/cpu/runtime/multi_stream.py", line 4, in
import intel_extension_for_pytorch._C as core
ImportError: /root/miniconda3/envs/pytorch/lib/python3.9/site-packages/intel_extension_for_pytorch/lib/libintel-ext-pt-gpu.so: undefined symbol: _ZNK5torch8autograd4Node4nameB5cxx11Ev
Some version doesn't exist anymore, I have to pick the closest ones.
(pytorch) [root@MPVC333 ~]# pip install torch==1.13.0a0 torchvision==0.14.1a0 -f https://developer.intel.com/ipex-whl-stable-xpupython ; pip install intel_extension_for_pytorch==1.13.10+xpu oneccl_bind_pt==1.13.100+gpu -f https://developer.intel.com/ipex-whl-stable-xpu
Looking in links: https://developer.intel.com/ipex-whl-stable-xpupython
ERROR: Could not find a version that satisfies the requirement torch==1.13.0a0 (from versions: 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0)
ERROR: No matching distribution found for torch==1.13.0a0
Looking in links: https://developer.intel.com/ipex-whl-stable-xpu
Collecting intel_extension_for_pytorch==1.13.10+xpu
Downloading https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/ipex_stable/xpu/intel_extension_for_pytorch-1.13.10%2Bxpu-cp39-cp39-linux_x86_64.whl (357.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 357.8/357.8 MB 7.4 MB/s eta 0:00:00
Collecting oneccl_bind_pt==1.13.100+gpu
Downloading https://intel-optimized-pytorch.s3.cn-north-1.amazonaws.com.cn/torch_ccl/xpu/oneccl_bind_pt-1.13.100%2Bgpu-cp39-cp39-linux_x86_64.whl (310 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 310.4/310.4 kB 146.5 MB/s eta 0:00:00
Collecting psutil
Downloading psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 282.1/282.1 kB 12.5 MB/s eta 0:00:00
Collecting numpy
Downloading numpy-1.24.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 92.0 MB/s eta 0:00:00
Installing collected packages: oneccl_bind_pt, psutil, numpy, intel_extension_for_pytorch
Successfully installed intel_extension_for_pytorch-1.13.10+xpu numpy-1.24.3 oneccl_bind_pt-1.13.100+gpu psutil-5.9.5
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
(pytorch) [root@MPVC333 ~]# pip install torch==1.13.1 torchvision==0.14.1a0 -f https://developer.intel.com/ipex-whl-stable-xpupython
Looking in links: https://developer.intel.com/ipex-whl-stable-xpupython
Collecting torch==1.13.1
Downloading torch-1.13.1-cp39-cp39-manylinux1_x86_64.whl (887.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 887.4/887.4 MB 8.0 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement torchvision==0.14.1a0 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.8.2, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1)
ERROR: No matching distribution found for torchvision==0.14.1a0
(pytorch) [root@MPVC333 ~]# pip install torch==1.13.1 torchvision==0.14.1 -f https://developer.intel.com/ipex-whl-stable-xpupython
Looking in links: https://developer.intel.com/ipex-whl-stable-xpupython
Collecting torch==1.13.1
Using cached torch-1.13.1-cp39-cp39-manylinux1_x86_64.whl (887.4 MB)
Collecting torchvision==0.14.1
Downloading torchvision-0.14.1-cp39-cp39-manylinux1_x86_64.whl (24.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 24.2/24.2 MB 80.5 MB/s eta 0:00:00
Collecting nvidia-cublas-cu11==11.10.3.66
Downloading nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 317.1/317.1 MB 20.0 MB/s eta 0:00:00
Collecting nvidia-cuda-nvrtc-cu11==11.7.99
Downloading nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.0/21.0 MB 88.1 MB/s eta 0:00:00
Collecting nvidia-cudnn-cu11==8.5.0.96
Downloading nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 557.1/557.1 MB 12.0 MB/s eta 0:00:00
Collecting nvidia-cuda-runtime-cu11==11.7.99
Downloading nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 849.3/849.3 kB 124.9 MB/s eta 0:00:00
Collecting typing-extensions
Downloading typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Requirement already satisfied: numpy in ./miniconda3/envs/pytorch/lib/python3.9/site-packages (from torchvision==0.14.1) (1.24.3)
Collecting pillow!=8.3.*,>=5.3.0
Downloading Pillow-9.5.0-cp39-cp39-manylinux_2_28_x86_64.whl (3.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 109.1 MB/s eta 0:00:00
Collecting requests
Downloading requests-2.29.0-py3-none-any.whl (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.5/62.5 kB 66.9 MB/s eta 0:00:00
Requirement already satisfied: setuptools in ./miniconda3/envs/pytorch/lib/python3.9/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch==1.13.1) (66.0.0)
Requirement already satisfied: wheel in ./miniconda3/envs/pytorch/lib/python3.9/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch==1.13.1) (0.38.4)
Collecting idna<4,>=2.5
Downloading idna-3.4-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 67.3 MB/s eta 0:00:00
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.9/140.9 kB 130.5 MB/s eta 0:00:00
Collecting charset-normalizer<4,>=2
Downloading charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.2/199.2 kB 160.0 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 138.6 MB/s eta 0:00:00
Installing collected packages: urllib3, typing-extensions, pillow, nvidia-cuda-runtime-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cublas-cu11, idna, charset-normalizer, certifi, requests, nvidia-cudnn-cu11, torch, torchvision
Successfully installed certifi-2022.12.7 charset-normalizer-3.1.0 idna-3.4 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 pillow-9.5.0 requests-2.29.0 torch-1.13.1 torchvision-0.14.1 typing-extensions-4.5.0 urllib3-1.26.15
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Intel_Extension_For_PyTorch_Hello_World.py in the Intel_Extension_For_PyTorch_GettingStarted sample and reproduce the reported import failure using the package versions and installation commands in the issue. Check the PyTorch, torchvision, and Intel Extension for PyTorch compatibility, then verify that the sample imports successfully and runs on the GPU environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100