intel / intel-extension-for-pytorch

A Python package for extending the official PyTorch that can easily obtain performance on Intel platform
Apache License 2.0
1.53k stars 236 forks source link

(ipex 1.13.120+xpu) undefined symbol: _ZNK3c107SymBool10guard_boolEPKcl #477

Closed ytzhang1 closed 9 months ago

ytzhang1 commented 9 months ago

Describe the issue

Hi, I recently reinstalled ipex1.13.120+xpu following the instructions on this page,

https://intel.github.io/intel-extension-for-pytorch/xpu/1.13.120+xpu/tutorials/installation.html

The command is, python -m pip install torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/

So it will install torch 1.13.0a0+git6c9b55e

While loading one of my dynamic library, I get the error in the title. I didn't see such error while back in July. With some research, it seems that the symbol comes from torch/lib/libc10.so and is only present under torch 2.0.

The only place I called c10 function is when I try to obtain the sycl queue in the following code,

auto device_type = c10::DeviceType::XPU; c10::impl::VirtualGuardImpl impl(device_type); c10::Stream dpcpp_stream = impl.getStream(c10::Device(device_type)); auto queue = xpu::get_queue_from_stream(dpcpp_stream);

Any idea why this error shows up ? Thanks!

jingxu10 commented 9 months ago

could you run the following codes and share output?

wget https://raw.githubusercontent.com/intel/intel-extension-for-pytorch/master/scripts/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
ytzhang1 commented 9 months ago

Hi, I found the issue, which is not related with ipex, somehow the dynamic library I'm working on is linked with another version of ipex.... sorry to interrupt, Thanks!