Description
Describe the bug
C:\Users\clear\miniconda3\envs\310\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: 'Could not find module 'C:\Users\clear\miniconda3\envs\310\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax.'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?
warn(
Collecting environment information...
Traceback (most recent call last):
File "C:\pythonxm\测试ARC显卡\collect_env.py", line 517, in
main()
File "C:\pythonxm\测试ARC显卡\collect_env.py", line 512, in main
output = get_pretty_env_info()
File "C:\pythonxm\测试ARC显卡\collect_env.py", line 507, in get_pretty_env_info
return pretty_str(get_env_info())
File "C:\pythonxm\测试ARC显卡\collect_env.py", line 368, in get_env_info
xpu_available_str = str(torch.xpu.is_available())
File "C:\Users\clear\miniconda3\envs\310\lib\site-packages\torch\xpu_init_.py", line 63, in is_available
return device_count() > 0
File "C:\Users\clear\miniconda3\envs\310\lib\site-packages\torch\xpu_init_.py", line 57, in device_count
return torch._C._xpu_getDeviceCount()
RuntimeError: Can't add devices across platforms to a single context. -33 (PI_ERROR_INVALID_DEVICE)
conda install libuv
python -m pip install torch==2.3.1+cxx11.abi torchvision==0.18.1+cxx11.abi torchaudio==2.3.1+cxx11.abi intel-extension-for-pytorch==2.3.110+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/lnl/cn/
Versions
C:\Users\clear\miniconda3\envs\310\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: 'Could not find module 'C:\Users\clear\miniconda3\envs\310\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax.'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?
warn(
Collecting environment information...
Traceback (most recent call last):
File "C:\pythonxm\测试ARC显卡\collect_env.py", line 517, in
main()
File "C:\pythonxm\测试ARC显卡\collect_env.py", line 512, in main
output = get_pretty_env_info()
File "C:\pythonxm\测试ARC显卡\collect_env.py", line 507, in get_pretty_env_info
return pretty_str(get_env_info())
File "C:\pythonxm\测试ARC显卡\collect_env.py", line 368, in get_env_info
xpu_available_str = str(torch.xpu.is_available())
File "C:\Users\clear\miniconda3\envs\310\lib\site-packages\torch\xpu_init_.py", line 63, in is_available
return device_count() > 0
File "C:\Users\clear\miniconda3\envs\310\lib\site-packages\torch\xpu_init_.py", line 57, in device_count
return torch._C._xpu_getDeviceCount()
RuntimeError: Can't add devices across platforms to a single context. -33 (PI_ERROR_INVALID_DEVICE)
Activity
ZailiWang commentedon Oct 5, 2024
Hi, let me have a check and get back to you. Thanks.
byclear commentedon Oct 5, 2024
好的。麻烦你看看。谢谢
ZailiWang commentedon Oct 9, 2024
Hi, are you sure you are using an integrated Arc in Meteor Lake or Lunar Lake processors, or a discrete Arc device? Please be aware the pip package urls are different for these devices in the installation guide
byclear commentedon Oct 9, 2024
I am certain that the device I am using is the Intel A770M. I used 2.1.40 without any problem. But when I use 2.3.110, I get an error. I am using NUC12. Viper Canyon
byclear commentedon Oct 9, 2024
主板 Intel Corporation
型号 NUC12SNKi72
版本 M45201-502
操作系统 Microsoft Windows 11 企业版 LTSC (64 位)
版本 24H2 (10.0.26100)
版本(内部版本号)
设备和驱动程序
处理器 12th Gen Intel® Core™ i7-12700H
显卡
Intel® Iris® Xe Graphics
Intel® Arc™ A770M Graphics
ZailiWang commentedon Oct 9, 2024
The
extra-index-url
argument varies for discrete/integrated arc graphics. In your 2.3.110 installation step you used a url for Lunar Lake, which is not available when 2.1.40 released, so it's a bit confusing.A NUC12 should have a discrete A770M card in it, so please try to change the url to
byclear commentedon Oct 9, 2024
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\clear\miniconda3\envs\torch\lib\site-packages\torch_init_.py", line 143, in
raise err
OSError: [WinError 126] 找不到指定的模块。 Error loading "C:\Users\clear\miniconda3\envs\torch\lib\site-packages\torch\lib\backend_with_compiler.dll" or one of its dependencies.
我要又要重复 2.1.40了嘛 one api嘛。我还是想使用预编译的。看看有没有会比较稳定和快。。。 one api 都停止维护了
ZailiWang commentedon Oct 9, 2024
啊不是。。我也中文吧.就是你还是按2.3.110的安装文档来,只不过
python -m pip install
装ipex时留意下把最后那个extra-index-url
参数改成我上边说的那个(而不是你主帖里的/lnl/us 结尾那个)byclear commentedon Oct 9, 2024
python -m pip install torch==2.3.1+cxx11.abi torchvision==0.18.1+cxx11.abi torchaudio==2.3.1+cxx11.abi intel-extension-for-pytorch==2.3.110+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/
你贴一下完整代码可以嘛。好大哥。我是这个
byclear commentedon Oct 9, 2024
我装完就是报错了没有DLL。因为我的系统重新装了。之前的系统装oneapi。确实可以用的。现在一直反复好像找不到GPU。按照文档安装 遇到RuntimeError: Can't add devices across platforms to a single context. -33 (PI_ERROR_INVALID_DEVICE) 错误。按照你给的url安装 遇到缺失DLL OSError: [WinError 126] 找不到指定的模块。 Error loading "C:\Users\clear\miniconda3\envs\torch\lib\site-packages\torch\lib\backend_with_compiler.dll" or one of its dependencies.
byclear commentedon Oct 9, 2024
这个问题。似乎能解决的唯一路径。就是安装oneapi 并且环境变量配置oneapi的dll 也能解决这个问题。。但是想用有没有编译好的.看看速度有没有更快。
ZailiWang commentedon Oct 9, 2024
你的意思是重装完系统,安装2.3.110时,如果不单独装oneAPI, 还是会报错?即使在修改了extra-index-url 后也还一样?
jingxu10 commentedon Oct 9, 2024
你跑过
conda install libuv
吗?byclear commentedon Oct 9, 2024
哦 不好意思,确实没有跑conda install libuv ,运行完之后还是这个问题。C:\Userslear\miniconda3\envs\pytorch\lib\site-packages\intel_extension_for_pytorch\llm_init__. py:9: UserWarning: failed to use huggingface generation fuctions due to: 没有名为 'transformers' 的模块。
warnings.warn(f “failed to use huggingface generation fuctions due to: {e}.”)
2.3.1+cxx11.abi
2.3.110+xpu
回溯(最近调用):
文件 “”, 第 1 行, 在 中
File “C:\Users\clear\miniconda3\envs\pytorch\libsite-packages\torch\xpu_init_.py”, line 57, in device_count
return torch._C._xpu_getDeviceCount()
运行时错误: 无法在单个上下文中添加跨平台的设备。-33 (pi_error_invalid_device)
我的命令
conda install libuv
python -m pip install torch==2.3.1+cxx11.abi torchvision==0.18.1+cxx11.abi torchaudio==2.3.1+cxx11.abi intel-extension-for-pytorch==2.3.110+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/
29 remaining items