Pdch's Blog

Back

目录#

step 1 安装GPU驱动#

前往Intel GPU驱动网站,安装驱动。

step 2 安装PyTorch#

我选择的是使用pip进行安装。你可以先使用conda创建一个虚拟环境。

安装命令

release Version

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu
shell

nightly Version

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu
shell

完成后进行测试。

python -c "import torch; print(torch.__version__); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"
shell

最后成功识别到显卡即为安装成功。

前往example进行愉快的玩耍吧。

step 3 安装intel-gpu-tools。#

安装intel-gpu-tools可以帮助你更好地监控和管理Intel GPU。

sudo apt install intel-gpu-tools
shell

安装完成后,你可以使用以下命令查看GPU状态:

sudo intel_gpu_top
shell

来查看GPU的使用情况。

Intel A770 GPU深度学习环境搭建(Linux)
https://pd-ch.github.io/blog/2024-06-28-a770_deeplearning_env_setup
Author Pdch
Published at June 28, 2024
Comment seems to stuck. Try to refresh?✨