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

Can't find device after installing intel pytorch 2.3.1 #702

Closed
bisjack opened this issue Sep 11, 2024 · 16 comments
Closed

Can't find device after installing intel pytorch 2.3.1 #702

bisjack opened this issue Sep 11, 2024 · 16 comments
Assignees
Labels

Comments

@bisjack
Copy link

bisjack commented Sep 11, 2024

Describe the bug

sanity test:
python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.version); print(ipex.version); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"
/home/bjyuan/anaconda3/envs/ipex/lib/python3.10/site-packages/intel_extension_for_pytorch/llm/init.py:9: UserWarning: failed to use huggingface generation fuctions due to: No module named 'transformers'.
warnings.warn(f"failed to use huggingface generation fuctions due to: {e}.")
2.3.1+cxx11.abi
2.3.110+xpu
/home/bjyuan/anaconda3/envs/ipex/lib/python3.10/site-packages/torch/xpu/init.py:57: UserWarning: XPU device count is zero! (Triggered internally at /build/pytorch/c10/xpu/XPUFunctions.cpp:50.)
return torch._C._xpu_getDeviceCount()

while sycl-ls returns:
[opencl:cpu][opencl:0] Intel(R) OpenCL, 12th Gen Intel(R) Core(TM) i9-12900K OpenCL 3.0 (Build 0) [2024.18.7.0.11_160000]
[opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) A770 Graphics OpenCL 3.0 NEO [24.22.29735.27]
[opencl:gpu][opencl:2] Intel(R) OpenCL Graphics, Intel(R) UHD Graphics 770 OpenCL 3.0 NEO [24.22.29735.27]
[level_zero:gpu][level_zero:0] Intel(R) Level-Zero, Intel(R) Arc(TM) A770 Graphics 1.3 [1.3.29735]
[level_zero:gpu][level_zero:1] Intel(R) Level-Zero, Intel(R) UHD Graphics 770 1.3 [1.3.29735]

Versions

/home/bjyuan/anaconda3/envs/ipex/lib/python3.10/site-packages/intel_extension_for_pytorch/llm/init.py:9: UserWarning: failed to use huggingface generation fuctions due to: No module named 'transformers'.
warnings.warn(f"failed to use huggingface generation fuctions due to: {e}.")
Collecting environment information...
/home/bjyuan/anaconda3/envs/ipex/lib/python3.10/site-packages/torch/xpu/init.py:57: UserWarning: XPU device count is zero! (Triggered internally at /build/pytorch/c10/xpu/XPUFunctions.cpp:50.)
return torch._C._xpu_getDeviceCount()
PyTorch version: 2.3.1+cxx11.abi
PyTorch CXX11 ABI: Yes
IPEX version: 2.3.110+xpu
IPEX commit: 95c9459
Build type: Release

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: N/A
IGC version: 2024.2.1 (2024.2.1.20240711)
CMake version: N/A
Libc version: glibc-2.35

Python version: 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-6.8.0-40-generic-x86_64-with-glibc2.35
Is XPU available: False
DPCPP runtime version: 2024.2
MKL version: 2024.2
GPU models and configuration:

Intel OpenCL ICD version: 24.22.29735.27-91422.04
Level Zero version: 1.3.29735.27-914
22.04

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Vendor ID: GenuineIntel
Model name: 12th Gen Intel(R) Core(TM) i9-12900K
CPU family: 6
Model: 151
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 2
CPU max MHz: 5200.0000
CPU min MHz: 800.0000
BogoMIPS: 6374.40
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 640 KiB (16 instances)
L1i cache: 768 KiB (16 instances)
L2 cache: 14 MiB (10 instances)
L3 cache: 30 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-23
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Mitigation; Clear Register File
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

Versions of relevant libraries:
[pip3] intel_extension_for_pytorch==2.3.110+xpu
[pip3] numpy==2.1.1
[pip3] torch==2.3.1+cxx11.abi
[pip3] torchaudio==2.3.1+cxx11.abi
[pip3] torchvision==0.18.1+cxx11.abi
[conda] intel-extension-for-pytorch 2.3.110+xpu pypi_0 pypi
[conda] mkl 2024.2.1 pypi_0 pypi
[conda] mkl-dpcpp 2024.2.1 pypi_0 pypi
[conda] numpy 2.1.1 pypi_0 pypi
[conda] onemkl-sycl-blas 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-datafitting 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-dft 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-lapack 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-rng 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-sparse 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-stats 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-vm 2024.2.1 pypi_0 pypi
[conda] torch 2.3.1+cxx11.abi pypi_0 pypi
[conda] torchaudio 2.3.1+cxx11.abi pypi_0 pypi
[conda] torchvision 0.18.1+cxx11.abi pypi_0 pypi

@xiguiw xiguiw self-assigned this Sep 11, 2024
@xiguiw
Copy link
Contributor

xiguiw commented Sep 11, 2024

@bisjack

  1. Have you set oneAPI environment variable before sanity test?
  2. How do you install the environment (Do you follow the this link to install your environment IPEX installation ?

@xiguiw
Copy link
Contributor

xiguiw commented Sep 11, 2024

Follow this page:
https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.3.110%2bxpu&os=linux%2fwsl2&package=pip

Sanity Test

export OCL_ICD_VENDORS=/etc/OpenCL/vendors
export CCL_ROOT=${CONDA_PREFIX}
python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"

@bisjack
Copy link
Author

bisjack commented Sep 11, 2024

@bisjack

  1. Have you set oneAPI environment variable before sanity test?
  2. How do you install the environment (Do you follow the this link to install your environment IPEX installation ?
  1. Yes, otherwise sycl-ls can't be found.
  2. I created a anaconda env and followed those steps.

I just pass the sanity check(without setting OCL_ICD_VENDORS and CCL_ROOT) by installing ipex with a python venv instead of anaconda env, thanks for your reply.

@xiguiw
Copy link
Contributor

xiguiw commented Sep 12, 2024

@bisjack

  1. Have you set oneAPI environment variable before sanity test?
  2. How do you install the environment (Do you follow the this link to install your environment IPEX installation ?
  1. Yes, otherwise sycl-ls can't be found.
  2. I created a anaconda env and followed those steps.

I just pass the sanity check(without setting OCL_ICD_VENDORS and CCL_ROOT) by installing ipex with a python venv instead of anaconda env, thanks for your reply.

Great you passed the sanity check.

Anaconda env and python venv just manage the software environment. There is no difference.

You can double confirm or reinstall IPEX in anaconda follow this page:
IPEX installation

Anything I can help?

@xiguiw
Copy link
Contributor

xiguiw commented Sep 19, 2024

@bisjack
Can you find the xpu device in conda environment?

@chsasank
Copy link

Indeed can not find Arc 770 on ipex 2.3.110.

(ipex-2.3.110) sasank@arc-reactor:~$ sycl-ls
[opencl:cpu][opencl:0] Intel(R) OpenCL, 12th Gen Intel(R) Core(TM) i5-12400 OpenCL 3.0 (Build 0) [2024.18.7.0.11_160000]
[opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) A770 Graphics OpenCL 3.0 NEO  [24.22.29735.27]
[level_zero:gpu][level_zero:0] Intel(R) Level-Zero, Intel(R) Arc(TM) A770 Graphics 1.3 [1.3.29735]
(ipex-2.3.110) sasank@arc-reactor:~$ python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"
2.3.1+cxx11.abi
2.3.110+xpu
/home/sasank/miniconda3/envs/ipex-2.3.110/lib/python3.10/site-packages/torch/xpu/__init__.py:57: UserWarning: XPU device count is zero! (Triggered internally at /build/pytorch/c10/xpu/XPUFunctions.cpp:50.)
  return torch._C._xpu_getDeviceCount()

@xiguiw
Copy link
Contributor

xiguiw commented Sep 20, 2024

@chsasank

Do you follow the instructions here to install your environment [IPEX installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?

What's packages in your conda environment. Could give the results of pip list?

Do you have these packages installed?

certifi                          2024.8.30
dpcpp-cpp-rt                     2024.2.1
fsspec                           2024.6.1
intel-cmplr-lib-rt               2024.2.1
intel-cmplr-lib-ur               2024.2.1
intel-cmplr-lic-rt               2024.2.1
intel-opencl-rt                  2024.2.1
intel-openmp                     2024.2.1
intel-sycl-rt                    2024.2.1
mkl                              2024.2.1
mkl-dpcpp                        2024.2.1
onemkl-sycl-blas                 2024.2.1
onemkl-sycl-datafitting          2024.2.1
onemkl-sycl-dft                  2024.2.1
onemkl-sycl-lapack               2024.2.1
onemkl-sycl-rng                  2024.2.1
onemkl-sycl-sparse               2024.2.1
onemkl-sycl-stats                2024.2.1
onemkl-sycl-vm                   2024.2.1
pytz                             2024.2
regex                            2024.9.11
tzdata                           2024.1

@chsasank
Copy link

Unfortunately I destroyed the conda env. Yes, I have followed above instructions to install ipex.

@xiguiw
Copy link
Contributor

xiguiw commented Sep 23, 2024

Unfortunately I destroyed the conda env. Yes, I have followed above instructions to install ipex.

@chsasank
You can setup up IPEX by following this IPEX installation.
Then list the packages

  1. Make sure your driver version is: 950.13
  2. IPEX will install oneAPI (2024.2.1). You do not need to install oneAPI separately.
  3. Follow this to check IPEX
export OCL_ICD_VENDORS=/etc/OpenCL/vendors
export CCL_ROOT=${CONDA_PREFIX}
python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"

@bisjack
Copy link
Author

bisjack commented Sep 23, 2024

@bisjack Can you find the xpu device in conda environment?

By oneapi toolkit, yes;
By ipex, no;

@xiguiw
Copy link
Contributor

xiguiw commented Sep 23, 2024

@bisjack Can you find the xpu device in conda environment?

By oneapi toolkit, yes; By ipex, no;

@bisjack
IPEX install oneAPI dependency automatically.

  1. Is your oneAPI toolkit version matched ipex installed?
  2. Run ipex without set oneAPI (environment variables), can IPEX find the XPU device?

Here listed IPEX installed oneAPI dependency packages for your reference:

certifi                          2024.8.30
dpcpp-cpp-rt                     2024.2.1
fsspec                           2024.6.1
intel-cmplr-lib-rt               2024.2.1
intel-cmplr-lib-ur               2024.2.1
intel-cmplr-lic-rt               2024.2.1
intel-opencl-rt                  2024.2.1
intel-openmp                     2024.2.1
intel-sycl-rt                    2024.2.1
mkl                              2024.2.1
mkl-dpcpp                        2024.2.1
onemkl-sycl-blas                 2024.2.1
onemkl-sycl-datafitting          2024.2.1
onemkl-sycl-dft                  2024.2.1
onemkl-sycl-lapack               2024.2.1
onemkl-sycl-rng                  2024.2.1
onemkl-sycl-sparse               2024.2.1
onemkl-sycl-stats                2024.2.1
onemkl-sycl-vm                   2024.2.1
pytz                             2024.2
regex                            2024.9.11
tzdata                           2024.1

@bisjack
Copy link
Author

bisjack commented Sep 23, 2024

@bisjack Can you find the xpu device in conda environment?

By oneapi toolkit, yes; By ipex, no;

@bisjack IPEX install oneAPI dependency automatically.

1. Is your oneAPI toolkit version matched ipex installed?

2. Run ipex without set oneAPI (environment variables), can IPEX find the XPU device?

Here listed IPEX installed oneAPI dependency packages for your reference:

certifi                          2024.8.30
dpcpp-cpp-rt                     2024.2.1
fsspec                           2024.6.1
intel-cmplr-lib-rt               2024.2.1
intel-cmplr-lib-ur               2024.2.1
intel-cmplr-lic-rt               2024.2.1
intel-opencl-rt                  2024.2.1
intel-openmp                     2024.2.1
intel-sycl-rt                    2024.2.1
mkl                              2024.2.1
mkl-dpcpp                        2024.2.1
onemkl-sycl-blas                 2024.2.1
onemkl-sycl-datafitting          2024.2.1
onemkl-sycl-dft                  2024.2.1
onemkl-sycl-lapack               2024.2.1
onemkl-sycl-rng                  2024.2.1
onemkl-sycl-sparse               2024.2.1
onemkl-sycl-stats                2024.2.1
onemkl-sycl-vm                   2024.2.1
pytz                             2024.2
regex                            2024.9.11
tzdata                           2024.1

My oneapi version is 2024.2.1;
(base) bjyuan@LM1:/Desktop$ conda activate ipex
(ipex) bjyuan@LM1:
/Desktop$ export OCL_ICD_VENDORS=/etc/OpenCL/vendors
(ipex) bjyuan@LM1:/Desktop$ export CCL_ROOT=${CONDA_PREFIX}
(ipex) bjyuan@LM1:
/Desktop$ python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.version); print(ipex.version); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"

/home/bjyuan/anaconda3/envs/ipex/lib/python3.10/site-packages/intel_extension_for_pytorch/llm/init.py:9: UserWarning: failed to use huggingface generation fuctions due to: No module named 'transformers'.
warnings.warn(f"failed to use huggingface generation fuctions due to: {e}.")
2.3.1+cxx11.abi
2.3.110+xpu
/home/bjyuan/anaconda3/envs/ipex/lib/python3.10/site-packages/torch/xpu/init.py:57: UserWarning: XPU device count is zero! (Triggered internally at /build/pytorch/c10/xpu/XPUFunctions.cpp:50.)
return torch._C._xpu_getDeviceCount()
(ipex) bjyuan@LM1:~/Desktop$ source /opt/intel/oneapi/setvars.sh

:: initializing oneAPI environment ...
bash: BASH_VERSION = 5.1.16(1)-release
args: Using "$@" for setvars.sh arguments:
:: advisor -- latest
:: ccl -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: ipp -- latest
:: ippcp -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vtune -- latest
:: oneAPI environment initialized ::

(ipex) bjyuan@LM1:~/Desktop$ sycl-ls
[opencl:cpu][opencl:0] Intel(R) OpenCL, 12th Gen Intel(R) Core(TM) i9-12900K OpenCL 3.0 (Build 0) [2024.18.7.0.11_160000]
[opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) A770 Graphics OpenCL 3.0 NEO [24.22.29735.27]
[opencl:gpu][opencl:2] Intel(R) OpenCL Graphics, Intel(R) UHD Graphics 770 OpenCL 3.0 NEO [24.22.29735.27]
[level_zero:gpu][level_zero:0] Intel(R) Level-Zero, Intel(R) Arc(TM) A770 Graphics 1.3 [1.3.29735]
[level_zero:gpu][level_zero:1] Intel(R) Level-Zero, Intel(R) UHD Graphics 770 1.3 [1.3.29735]

@xiguiw
Copy link
Contributor

xiguiw commented Sep 23, 2024

@bisjack @chsasank
Thanks for your feedback information.
The IPEX installed oneAPI package version looks OK.
I cannot reproduce at my side.

Would you please run these two commands and feedback your environment info?

  1. dpkg -l | grep zero -i

wget https://raw.githubusercontent.com/intel/intel-extension-for-pytorch/master/scripts/collect_env.py
python collect_env.py

@bisjack
Copy link
Author

bisjack commented Sep 23, 2024

@bisjack @chsasank Thanks for your feedback information. The IPEX installed oneAPI package version looks OK. I cannot reproduce at my side.

Would you please run these two commands and feedback your environment info?

1. `dpkg -l | grep zero -i`
wget https://raw.githubusercontent.com/intel/intel-extension-for-pytorch/master/scripts/collect_env.py
python collect_env.py

1.ii intel-level-zero-gpu 1.3.29735.27-91422.04 amd64 Intel(R) Graphics Compute Runtime for oneAPI Level Zero.
ii intel-level-zero-gpu-raytracing 1.0.0-60
u22.04 amd64 Level Zero Ray Tracing Support library
ii level-zero 1.16.15-88122.04 amd64 Intel(R) Graphics Compute Runtime for oneAPI Level Zero.
ii level-zero-dev 1.16.15-881
22.04 amd64 Intel(R) Graphics Compute Runtime for oneAPI Level Zero.
ii libze1 1.17.6-914~22.04 amd64 Intel(R) Graphics Compute Runtime for oneAPI Level Zero.
2./home/bjyuan/anaconda3/envs/ipex/lib/python3.10/site-packages/intel_extension_for_pytorch/llm/init.py:9: UserWarning: failed to use huggingface generation fuctions due to: No module named 'transformers'.
warnings.warn(f"failed to use huggingface generation fuctions due to: {e}.")
Collecting environment information...
/home/bjyuan/anaconda3/envs/ipex/lib/python3.10/site-packages/torch/xpu/init.py:57: UserWarning: XPU device count is zero! (Triggered internally at /build/pytorch/c10/xpu/XPUFunctions.cpp:50.)
return torch._C._xpu_getDeviceCount()
PyTorch version: 2.3.1+cxx11.abi
PyTorch CXX11 ABI: Yes
IPEX version: 2.3.110+xpu
IPEX commit: 95c9459
Build type: Release

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: N/A
IGC version: N/A
CMake version: N/A
Libc version: glibc-2.35

Python version: 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-6.8.0-40-generic-x86_64-with-glibc2.35
Is XPU available: False
DPCPP runtime version: N/A
MKL version: N/A
GPU models and configuration:

Intel OpenCL ICD version: 24.22.29735.27-91422.04
Level Zero version: 1.3.29735.27-914
22.04

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Vendor ID: GenuineIntel
Model name: 12th Gen Intel(R) Core(TM) i9-12900K
CPU family: 6
Model: 151
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 2
CPU max MHz: 5200.0000
CPU min MHz: 800.0000
BogoMIPS: 6374.40
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 640 KiB (16 instances)
L1i cache: 768 KiB (16 instances)
L2 cache: 14 MiB (10 instances)
L3 cache: 30 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-23
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Mitigation; Clear Register File
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

Versions of relevant libraries:
[pip3] intel_extension_for_pytorch==2.3.110+xpu
[pip3] numpy==2.1.1
[pip3] torch==2.3.1+cxx11.abi
[pip3] torchaudio==2.3.1+cxx11.abi
[pip3] torchvision==0.18.1+cxx11.abi
[conda] intel-extension-for-pytorch 2.3.110+xpu pypi_0 pypi
[conda] mkl 2024.2.1 pypi_0 pypi
[conda] mkl-dpcpp 2024.2.1 pypi_0 pypi
[conda] numpy 2.1.1 pypi_0 pypi
[conda] onemkl-sycl-blas 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-datafitting 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-dft 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-lapack 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-rng 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-sparse 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-stats 2024.2.1 pypi_0 pypi
[conda] onemkl-sycl-vm 2024.2.1 pypi_0 pypi
[conda] torch 2.3.1+cxx11.abi pypi_0 pypi
[conda] torchaudio 2.3.1+cxx11.abi pypi_0 pypi
[conda] torchvision 0.18.1+cxx11.abi pypi_0 pypi

@xiguiw
Copy link
Contributor

xiguiw commented Sep 24, 2024

@bisjack
Thanks for your feedback! The driver and oneAPI version are OK.

One possible reason is the version of libstdc++.so is old..
Could you check the version of libstdc++.so in system /usr/lib and the version in conda environment?

run this command:

  1. find /usr/lib -name libstdc++.so.*
  2. find <your conda env path> -name libstdc++.so.*
 find /usr/lib -name libstdc++.so.*
/usr/lib/i386-linux-gnu/libstdc++.so.6
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.32
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.32

 ls /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -l
lrwxrwxrwx 1 root root 19  7月 11  2023 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -> libstdc++.so.6.0.32

Some old version conda install ibstdc++.so.6.0.29, which make IPEX fail to find the device.

If it is 6.0.29 in conda, please update it to 6.0.30 and version above by:

  1. conda install -c conda-forge libstdcxx-ng or
  2. preload the one in /usr/lib
    export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30

Thanks!

@bisjack
Copy link
Author

bisjack commented Sep 24, 2024

@bisjack Thanks for your feedback! The driver and oneAPI version are OK.

One possible reason is the version of libstdc++.so is old.. Could you check the version of libstdc++.so in system /usr/lib and the version in conda environment?

run this command:

1. ` find /usr/lib -name libstdc++.so.*`

2. ` find <your conda env path> -name libstdc++.so.*`
 find /usr/lib -name libstdc++.so.*
/usr/lib/i386-linux-gnu/libstdc++.so.6
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.32
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.32

 ls /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -l
lrwxrwxrwx 1 root root 19  7月 11  2023 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -> libstdc++.so.6.0.32

Some old version conda install ibstdc++.so.6.0.29, which make IPEX fail to find the device.

If it is 6.0.29 in conda, please update it to 6.0.30 and version above by:

1. `conda install -c conda-forge libstdcxx-ng` or

2. preload the one in /usr/lib
   `export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30`

Thanks!

Yes, that is the problem. After I update libstdc++.so(it was 6.0.29 indeed), ipex can find device. Thanks for your help!

@bisjack bisjack closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants