From 7b6aa9528f851a9ba2b856285a1caaf341aa114e Mon Sep 17 00:00:00 2001 From: composable-tu <208613607+composable-tu@users.noreply.github.com> Date: Mon, 11 May 2026 19:45:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=BA=20Intel=20GPU=20README=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=B7=BB=E5=8A=A0=E4=B8=AD=E6=96=87=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backends/intel_gpu/README.md | 4 ++- backends/intel_gpu/README_cn.md | 53 +++++++++++++++++++++++++++++++++ backends/intel_hpu/README_cn.md | 4 +-- 3 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 backends/intel_gpu/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..d1f900a83af --- /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 +``` + +## Compile and Install + +```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 From b084c8e15617421a0d35ea1beeb16173422b1d42 Mon Sep 17 00:00:00 2001 From: composable-tu <208613607+composable-tu@users.noreply.github.com> Date: Mon, 11 May 2026 19:55:29 +0800 Subject: [PATCH 2/2] some fix --- README.md | 2 +- backends/intel_gpu/README_cn.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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_cn.md b/backends/intel_gpu/README_cn.md index d1f900a83af..45592ffa0d7 100644 --- a/backends/intel_gpu/README_cn.md +++ b/backends/intel_gpu/README_cn.md @@ -22,7 +22,7 @@ git submodule sync git submodule update --remote --init --recursive ``` -## Compile and Install +## 编译安装 ```bash # 进入 Intel GPU Backend 目录