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

Sanity Test fails: version `GLIBCXX_3.4.32' not found #770

Open
codecnotsupported opened this issue Jan 14, 2025 · 6 comments
Open

Sanity Test fails: version `GLIBCXX_3.4.32' not found #770

codecnotsupported opened this issue Jan 14, 2025 · 6 comments
Assignees

Comments

@codecnotsupported
Copy link

codecnotsupported commented Jan 14, 2025

Describe the bug

GPU: B580
Installed Using https://pytorch-extension.intel.com/installation?platform=gpu&version=v2.5.10%2Bxpu&os=linux%2Fwsl2&package=pip

python -m pip install torch==2.5.1+cxx11.abi torchvision==0.20.1+cxx11.abi torchaudio==2.5.1+cxx11.abi intel-extension-for-pytorch==2.5.10+xpu oneccl_bind_pt==2.5.0+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/

With a clean conda environment.

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())];"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File ".../anaconda3/envs/ML1/lib/python3.12/site-packages/intel_extension_for_pytorch/__init__.py", line 123, in <module>
    from .utils._proxy_module import *
  File ".../anaconda3/envs/ML1/lib/python3.12/site-packages/intel_extension_for_pytorch/utils/_proxy_module.py", line 2, in <module>
    import intel_extension_for_pytorch._C
ImportError: .../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /usr/lib/libze_loader.so.1)

Versions

Collecting environment information...
=====================================
PyTorch version:   2.5.1+cxx11.abi
PyTorch CXX11 ABI: Yes
IPEX version:      N/A
IPEX commit:       N/A
Build type:        N/A

OS:                EndeavourOS Linux (x86_64)
GCC version:       (GCC) 14.2.1 20240910
Clang version:     18.1.8
IGC version:       2025.0.4 (2025.0.4.20241205)
CMake version:     version 3.31.4
Libc version:      glibc-2.40

Python version:    3.12.8 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 16:31:09) [GCC 11.2.0] (64-bit runtime)
Python platform:   Linux-6.12.9-arch1-1-x86_64-with-glibc2.40
Is XPU available:  N/A
DPCPP runtime:     2025.0
MKL version:       2025.0

GPU models and configuration onboard:
N/A

GPU models and configuration detected:
N/A

Driver version:
* intel_opencl:	N/A
* level_zero:	N/A

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        39 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               12
On-line CPU(s) list:                  0-11
Vendor ID:                            GenuineIntel
Model name:                           11th Gen Intel(R) Core(TM) i5-11400F @ 2.60GHz
CPU family:                           6
Model:                                167
Thread(s) per core:                   2
Core(s) per socket:                   6
Socket(s):                            1
Stepping:                             1
CPU(s) scaling MHz:                   65%
CPU max MHz:                          4400.0000
CPU min MHz:                          800.0000
BogoMIPS:                             5186.00
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 est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap avx512ifma clflushopt intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm md_clear flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            288 KiB (6 instances)
L1i cache:                            192 KiB (6 instances)
L2 cache:                             3 MiB (6 instances)
L3 cache:                             12 MiB (1 instance)
NUMA node(s):                         1
NUMA node0 CPU(s):                    0-11
Vulnerability Gather data sampling:   Mitigation; Microcode
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Mitigation; Enhanced IBRS
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 SW loop, KVM SW loop
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[conda] dpcpp-cpp-rt              2025.0.4                 pypi_0    pypi
[conda] impi-devel                2021.14.0                pypi_0    pypi
[conda] impi-rt                   2021.14.0                pypi_0    pypi
[conda] intel-cmplr-lib-rt        2025.0.4                 pypi_0    pypi
[conda] intel-cmplr-lib-ur        2025.0.4                 pypi_0    pypi
[conda] intel-cmplr-lic-rt        2025.0.4                 pypi_0    pypi
[conda] intel-extension-for-pytorch 2.5.10+xpu               pypi_0    pypi
[conda] intel-opencl-rt           2025.0.4                 pypi_0    pypi
[conda] intel-openmp              2025.0.4                 pypi_0    pypi
[conda] intel-pti                 0.10.0                   pypi_0    pypi
[conda] intel-sycl-rt             2025.0.4                 pypi_0    pypi
[conda] mkl                       2025.0.1                 pypi_0    pypi
[conda] mkl-dpcpp                 2025.0.1                 pypi_0    pypi
[conda] numpy                     2.2.1                    pypi_0    pypi
[conda] oneccl                    2021.14.1                pypi_0    pypi
[conda] oneccl-bind-pt            2.5.0+xpu                pypi_0    pypi
[conda] oneccl-devel              2021.14.1                pypi_0    pypi
[conda] onemkl-sycl-blas          2025.0.1                 pypi_0    pypi
[conda] onemkl-sycl-datafitting   2025.0.1                 pypi_0    pypi
[conda] onemkl-sycl-dft           2025.0.1                 pypi_0    pypi
[conda] onemkl-sycl-lapack        2025.0.1                 pypi_0    pypi
[conda] onemkl-sycl-rng           2025.0.1                 pypi_0    pypi
[conda] onemkl-sycl-sparse        2025.0.1                 pypi_0    pypi
[conda] onemkl-sycl-stats         2025.0.1                 pypi_0    pypi
[conda] onemkl-sycl-vm            2025.0.1                 pypi_0    pypi
[conda] torch                     2.5.1+cxx11.abi          pypi_0    pypi
[conda] torchaudio                2.5.1+cxx11.abi          pypi_0    pypi
[conda] torchvision               0.20.1+cxx11.abi          pypi_0    pypi
@feng-intel feng-intel self-assigned this Jan 16, 2025
@feng-intel
Copy link

What's the output of "$ ldd /usr/lib/libze_loader.so.1"

@codecnotsupported
Copy link
Author

What's the output of "$ ldd /usr/lib/libze_loader.so.1"

        linux-vdso.so.1 (0x0000723ba6cbb000)
        libspdlog.so.1.15 => /usr/lib/libspdlog.so.1.15 (0x0000723ba6ba2000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000723ba6800000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x0000723ba6b74000)
        libc.so.6 => /usr/lib/libc.so.6 (0x0000723ba660f000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x0000723ba6cbd000)
        libfmt.so.11 => /usr/lib/libfmt.so.11 (0x0000723ba6b52000)
        libm.so.6 => /usr/lib/libm.so.6 (0x0000723ba6520000)

@feng-intel
Copy link

ImportError: .../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /usr/lib/libze_loader.so.1)

From your log, /usr/lib/libze_loader.so.1 links to .../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6 ?
Do you have .../anaconda3/envs/ML1/lib/libstdc++.so.6 ?

@codecnotsupported
Copy link
Author

codecnotsupported commented Jan 22, 2025

ImportError: .../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /usr/lib/libze_loader.so.1)

From your log, /usr/lib/libze_loader.so.1 links to .../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6 ? Do you have .../anaconda3/envs/ML1/lib/libstdc++.so.6 ?

$ file .../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6
.../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6: symbolic link to libstdc++.so.6.0.29
$ file .../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6.0.29
.../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6.0.29: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, with debug_info, not stripped

@codecnotsupported
Copy link
Author

$ nm .../anaconda3/envs/ML1/lib/python3.12/site-packages/torch/lib/../../../../libstdc++.so.6.0.29  | grep 'A GLIBCXX_3.4.'
0000000000000000 A GLIBCXX_3.4.1
0000000000000000 A GLIBCXX_3.4.10
0000000000000000 A GLIBCXX_3.4.11
0000000000000000 A GLIBCXX_3.4.12
0000000000000000 A GLIBCXX_3.4.13
0000000000000000 A GLIBCXX_3.4.14
0000000000000000 A GLIBCXX_3.4.15
0000000000000000 A GLIBCXX_3.4.16
0000000000000000 A GLIBCXX_3.4.17
0000000000000000 A GLIBCXX_3.4.18
0000000000000000 A GLIBCXX_3.4.19
0000000000000000 A GLIBCXX_3.4.2
0000000000000000 A GLIBCXX_3.4.20
0000000000000000 A GLIBCXX_3.4.21
0000000000000000 A GLIBCXX_3.4.22
0000000000000000 A GLIBCXX_3.4.23
0000000000000000 A GLIBCXX_3.4.24
0000000000000000 A GLIBCXX_3.4.25
0000000000000000 A GLIBCXX_3.4.26
0000000000000000 A GLIBCXX_3.4.27
0000000000000000 A GLIBCXX_3.4.28
0000000000000000 A GLIBCXX_3.4.29
0000000000000000 A GLIBCXX_3.4.3
0000000000000000 A GLIBCXX_3.4.4
0000000000000000 A GLIBCXX_3.4.5
0000000000000000 A GLIBCXX_3.4.6
0000000000000000 A GLIBCXX_3.4.7
0000000000000000 A GLIBCXX_3.4.8
0000000000000000 A GLIBCXX_3.4.9

@codecnotsupported
Copy link
Author

I believe it works when overriding the symlink to point to system's version /usr/lib/libstdc++.so.6.0.33
So Pytorch ships with a too old version of libstdc++?

(ML1) $ 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())];"


[W122 19:26:00.457271666 OperatorEntry.cpp:155] Warning: Warning only once for all operators,  other operators may also be overridden.
  Overriding a previously registered kernel for the same operator and the same dispatch key
  operator: aten::_cummax_helper(Tensor self, Tensor(a!) values, Tensor(b!) indices, int dim) -> ()
    registered at /build/pytorch/build/aten/src/ATen/RegisterSchema.cpp:6
  dispatch key: XPU
  previous kernel: registered at /build/pytorch/build/aten/src/ATen/RegisterCPU.cpp:30476
       new kernel: registered at /build/intel-pytorch-extension/build/Release/csrc/gpu/csrc/aten/generated/ATen/RegisterXPU.cpp:2971 (function operator())
2.5.1+cxx11.abi
2.5.10+xpu
[0]: _XpuDeviceProperties(name='Intel(R) Graphics [0xe20b]', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', driver_version='1.6.32224', total_memory=11605MB, max_compute_units=160, gpu_eu_count=160, gpu_subslice_count=20, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)

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