diff --git a/README.md b/README.md index a8ba929b358..47e0b67a4e7 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ - [飞桨自定义接入硬件后端(昇腾NPU)](backends/npu/README_cn.md) - [飞桨自定义接入硬件后端(寒武纪MLU)](backends/mlu/README_cn.md) -- [飞桨自定义接入硬件后端(英特尔GPU)](backends/intel_gpu/README.md) +- [飞桨自定义接入硬件后端(英特尔GPU)](backends/intel_gpu/README_cn.md) - [飞桨自定义接入硬件后端(苹果MPS)](backends/mps/README.md) - [飞桨自定义接入硬件后端(壁仞GPU)](backends/biren_gpu/README_cn.md) - [飞桨自定义接入硬件后端(燧原GCU)](backends/gcu/README_cn.md) diff --git a/backends/intel_gpu/README.md b/backends/intel_gpu/README.md index 3540ebb5e41..527175f966a 100644 --- a/backends/intel_gpu/README.md +++ b/backends/intel_gpu/README.md @@ -1,8 +1,10 @@ # PaddlePaddle Custom Device Implementaion for Custom Intel GPU +English | [简体中文](./README_cn.md) + Please refer to the following steps to compile, install and verify the custom device implementaion for Custom Intel GPU. -## Activate oneapi env vars +## Activate Intel oneAPI env vars ```bash source load.sh diff --git a/backends/intel_gpu/README_cn.md b/backends/intel_gpu/README_cn.md new file mode 100644 index 00000000000..45592ffa0d7 --- /dev/null +++ b/backends/intel_gpu/README_cn.md @@ -0,0 +1,53 @@ +# 飞桨自定义接入硬件后端(Intel GPU) + +简体中文 | [English](./README.md) + +请参考以下步骤进行硬件后端(Intel GPU)的编译安装与验证 + +## 激活 Intel oneAPI 环境变量 + +```bash +source load.sh +``` + +## 获取源码 + +```bash +# 克隆代码 +git clone --recursive https://github.com/PaddlePaddle/PaddleCustomDevice +cd PaddleCustomDevice + +# 请执行以下命令,以保证checkout最新的Paddle源码 +git submodule sync +git submodule update --remote --init --recursive +``` + +## 编译安装 + +```bash +# 进入 Intel GPU Backend 目录 +cd backends/intel_gpu + +# 编译前,请确保已安装 Paddle,您可以运行以下命令 +pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html + +# 创建编译目录并编译 +mkdir build && cd build + +cmake .. +make -j $(nproc) + +# 编译产出在dist路径下,使用pip安装 +pip install dist/paddle_custom_intel_gpu*.whl +``` + +## 验证 + +```bash +# 检查插件状态 +python -c "import paddle; print('intel_gpu' in paddle.device.get_all_custom_device_type())" + +# 预期输出 +True + +``` diff --git a/backends/intel_hpu/README_cn.md b/backends/intel_hpu/README_cn.md index 26f3390eeb0..7483d7653d0 100644 --- a/backends/intel_hpu/README_cn.md +++ b/backends/intel_hpu/README_cn.md @@ -40,12 +40,12 @@ pip install dist/paddle_habana_hpu*.whl ```bash # 列出可用硬件后端 python -c "import paddle; print(paddle.device.get_all_custom_device_type())" -# 期待输出以下结果 +# 预期输出以下结果 ['intel_hpu'] # 运行简单模型 python ../tests/test_MNIST_model.py -# 期待输出以下类似结果 +# 预期输出以下类似结果 ... ... Epoch 0 step 0, Loss = [2.2956038], Accuracy = 0.15625 Epoch 0 step 100, Loss = [2.1552896], Accuracy = 0.3125