-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* modify tensor_introduction doc (#4297) * modify tensor_introduction doc * modify according to nielang's advise, change picture quote method * fix bugs * fix some md format bugs * Update tensor images links * fix images link bugs * fix image link bugs * fix image link bugs * fix image link bugs * fix image link bugs * point Tensor's necessity; add the same and difference between tensor and numpy array * Modify some descriptions. * Update tensor_introduction_cn.md * Update tensor_introduction_cn.md * Update tensor_introduction_cn.md * Update tensor_introduction_cn.md * Update tensor_introduction_cn.md Co-authored-by: moguguo <[email protected]> * update hardware_info_cn.md (#4653) * update hardware_info_cn.md 1、更新昆仑2代芯片(R200)支持情况。 2、更新龙芯、飞腾cpu新增支持的型号。 * update index_cn.rst 1、新增飞桨对昆仑2代芯片的支持说明 * delete index_cn.rst 1、层级结构不需要调整,因此删除 * update index_cn.rst 1、新增飞桨对昆仑2代芯片的支持说明 * add file paadle_2.0_xpu2_cn.md 1、新增支持飞桨在昆仑2代芯片上的说明 * add paddle_install_xpu2_cn.md 1、新增飞桨在昆仑2代芯片上的安装说明文档 * add train_example_xpu2_cn.md 新增飞桨对昆仑2代芯片的训练示例 * delete xpu2_train.md 1、目录结构有问题,需要重新调整 * update train_example_xpu2_cn.md 1、更新飞桨在昆仑2代芯片上的训练示例文档 * update index_cn.rst 添加飞桨对硬件支持的索引页 * update install_xpu2_cn.md 更新编译线程 * update index_cn.rst 修改格式 * update paddle_2.0_xpu2_cn.md 添加套件链接、分支链接、单机单卡支持情况 * update install.md 补充文字描述 * update train_example 更新数据集描述 * update fix_code_style 修改代码格式问题 * update order_list 更新序列排序前端展示问题 * Update train_example_xpu2_cn.md * 更新序号问题 更新文档序号问题 * Update train_example_xpu2_cn.md * Update train_example_xpu2_cn.md Co-authored-by: Chen Long <[email protected]> * Update hardware_info_cn.md (#4409) * Update hardware_info_cn.md update several links to hardware installation * Update hardware_info_cn.md Co-authored-by: Chen Long <[email protected]> Co-authored-by: Sing_chan <[email protected]> Co-authored-by: moguguo <[email protected]> Co-authored-by: adaxiadaxi <[email protected]> Co-authored-by: onecatcn <[email protected]>
- Loading branch information
1 parent
2d8b745
commit ab2548b
Showing
7 changed files
with
648 additions
and
156 deletions.
There are no files selected for viewing
485 changes: 344 additions & 141 deletions
485
docs/guides/01_paddle2.0_introduction/basic_concept/tensor_introduction_cn.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ | |
xpu_docs/index_cn.rst | ||
rocm_docs/index_cn.rst | ||
npu_docs/index_cn.rst | ||
ipu_docs/index_cn.rst | ||
ipu_docs/index_cn.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
.. _cn_xpu_information: | ||
|
||
#################### | ||
昆仑XPU芯片运行飞桨 | ||
昆仑芯片运行飞桨 | ||
#################### | ||
|
||
百度昆仑AI计算处理器(Baidu KUNLUN AI Computing Processor)是百度集十年AI产业技术实践于2019年推出的全功能AI芯片。基于自主研发的先进XPU架构,为云端和边缘端的人工智能业务而设计。 百度昆仑与飞桨及其他国产软硬件强强组合,打造一个全面领先的国产化AI技术生态,部署和应用于诸多 “人工智能+“的行业领域,包括智能云和高性能计算,智慧制造、智慧城市和安防等。更多昆仑XPU芯片详情及技术指标请 `点击这里 <https://cloud.baidu.com/product/kunlun.html>`_ 。 | ||
百度昆仑AI计算处理器(Baidu KUNLUN AI Computing Processor)是百度集十年AI产业技术实践于2019年推出的全功能AI芯片。基于自主研发的先进XPU架构,为云端和边缘端的人工智能业务而设计。 百度昆仑与飞桨及其他国产软硬件强强组合,打造一个全面领先的国产化AI技术生态,部署和应用于诸多 “人工智能+“的行业领域,包括智能云和高性能计算,智慧制造、智慧城市和安防等。更多昆仑XPU芯片详情及技术指标请 `点击这里 <https://www.kunlunxin.com.cn/>`_ 。 | ||
参考以下内容可快速了解和体验昆仑XPU芯片上运行飞桨: | ||
|
||
- `飞桨对昆仑XPU芯片的支持 <./paddle_2.0_xpu_cn.html>`_ : 飞桨支持昆仑XPU芯片运行 | ||
- `飞桨框架昆仑xpu版安装说明 <./paddle_install_cn.html>`_ : 飞桨框架昆仑xpu版安装说明 | ||
- `飞桨框架昆仑XPU版训练示例 <./train_example_cn.html>`_ : 飞桨框架昆仑XPU版训练示例 | ||
- `飞桨预测库昆仑XPU版安装及使用 <./inference_install_example_cn.html>`_ : 飞桨预测库昆仑XPU版安装及使用示例 | ||
昆仑芯2代芯片: | ||
|
||
- `飞桨对昆仑2代芯片的支持 <./paddle_2.0_xpu_cn.html>`_ : 飞桨支持昆仑2代芯片(R200、R300)运行 | ||
- `飞桨框架昆仑2代芯片安装说明 <./paddle_install_cn.html>`_ : 飞桨框架昆仑2代芯片(R200、R300)安装说明 | ||
- `飞桨框架昆仑2代芯片训练示例 <./train_example_cn.html>`_ : 飞桨框架昆仑2代芯片(R200、R300)训练示例 | ||
|
||
昆仑芯1代芯片: | ||
|
||
- `飞桨对昆仑1代芯片的支持 <./paddle_2.0_xpu_cn.html>`_ : 飞桨支持昆仑1代芯片(K100、K200)运行 | ||
- `飞桨框架昆仑1代芯片安装说明 <./paddle_install_cn.html>`_ : 飞桨框架昆仑1代芯片(K100、K200)安装说明 | ||
- `飞桨框架昆仑1代芯片训练示例 <./train_example_cn.html>`_ : 飞桨框架昆仑1代芯片(K100、K200)训练示例 | ||
- `飞桨预测库昆仑1代芯片安装及使用 <./inference_install_example_cn.html>`_ : 飞桨预测库昆仑1代芯片(K100、K200)版安装及使用示例 | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
paddle_2.0_xpu2_cn.md | ||
paddle_install_xpu2_cn.md | ||
train_example_xpu2_cn.md | ||
paddle_2.0_xpu_cn.md | ||
paddle_install_cn.md | ||
train_example_cn.md | ||
inference_install_example_cn.md | ||
inference_install_example_cn.md |
36 changes: 36 additions & 0 deletions
36
docs/guides/09_hardware_support/xpu_docs/paddle_2.0_xpu2_cn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# 飞桨对昆仑2代芯片的支持 | ||
|
||
飞桨自2.3rc版本起支持在昆仑2代芯片上(R200,R300)运行,经验证的模型训练的支持情况如下: | ||
|
||
## 训练支持 | ||
|
||
可进行单机单卡/单机多卡训练的模型,如下所示: | ||
|
||
| 模型 | 领域 | 编程范式 | 可用的CPU类型 | 单机单卡支持 | 单机多卡支持 | | ||
| ------------------ | -------- |------------- | ----------------------- | -------------- | -------------- | | ||
| ResNet50 | 图像分类 | 动态图 | X86(Intel) | 支持 |- | | ||
| MobileNet_v3 | 图像分类 | 动态图 | X86(Intel) | 支持 |- | | ||
| UNet | 图像分割 | 动态图 | X86(Intel) | 支持 |- | | ||
| Yolov3-DarkNet53 | 目标检测 | 动态图 | X86(Intel) | 支持 |- | | ||
| SSD-ResNet34 | 目标检测 | 动态图 | X86(Intel) | 支持 |支持 | | ||
| OCR-DB | 文字检测 | 动态图 | X86(Intel) | 支持 |- | | ||
| Bert-Base | NLP | 静态图 | X86(Intel) | 支持 |支持 | | ||
| Transformer | NLP | 静态图 | X86(Intel) | 支持 |支持 | | ||
| GPT-2 | NLP | 动态图 | X86(Intel) | 支持 |- | | ||
| DeepFM | 推荐 | 动态图 | X86(Intel) | 支持 |- | | ||
| Wide&Deep | 推荐 | 动态图 | X86(Intel) | 支持 |- | | ||
|
||
|
||
|
||
模型放置在飞桨模型套件中,作为github.com/PaddlePaddle下的独立repo存在,git clone下载即可获取所需的模型文件: | ||
|
||
| 领域 | 套件名称 | 分支/版本 | | ||
| -------- | --------------- | ----------- | | ||
| 图像分类 | [PaddleClas](https://github.com/PaddlePaddle/PaddleClas) | [develop](https://github.com/PaddlePaddle/PaddleClas/tree/develop) | | ||
| 目标检测 | [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection) | [develop](https://github.com/PaddlePaddle/PaddleDetection/tree/develop) | | ||
| 图像分割 | [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg) | [develop](https://github.com/PaddlePaddle/PaddleSeg/tree/develop) | | ||
| NLP | [PaddleNLP](https://github.com/PaddlePaddle/PaddleNLP) | [develop](https://github.com/PaddlePaddle/PaddleNLP/tree/develop) | | ||
| OCR | [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR) | [dygraph](https://github.com/PaddlePaddle/PaddleOCR/tree/dygraph) | | ||
| 推荐 | [PaddleREC](https://github.com/PaddlePaddle/PaddleRec) | [master](https://github.com/PaddlePaddle/PaddleRec/tree/master) | | ||
|
||
* 注:支持基于Kermel Primitive算子的昆仑2代芯片支持,[点击这里](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/07_new_op/kernel_primitive_api/index_cn.html)。 |
175 changes: 175 additions & 0 deletions
175
docs/guides/09_hardware_support/xpu_docs/paddle_install_xpu2_cn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
# 飞桨框架昆仑2代芯片安装说明 | ||
|
||
在昆仑2代芯片上,飞桨框架支持基于python的训练和原生预测,当前最新版本为2.3rc,提供两种安装方式: | ||
|
||
**1. 预编译的支持昆仑2代芯片的wheel包** | ||
|
||
目前此wheel包只支持一种环境: | ||
|
||
英特尔CPU+昆仑2代芯片+Linux操作系统 | ||
|
||
**2. 源码编译安装** | ||
|
||
其他环境请选择源码编译安装。 | ||
|
||
## 安装方式一:通过Wheel包安装 | ||
|
||
### 下载安装包 | ||
|
||
**环境1:英特尔CPU+昆仑2代芯片+Linux操作系统** | ||
|
||
Linux发行版建议选择CentOS 7系统 | ||
|
||
Python3.7 | ||
|
||
``` | ||
wget https://paddle-inference-lib.bj.bcebos.com/2.3.0-rc0/python/Linux/XPU2/x86-64_gcc8.2_py36_avx_mkl/paddlepaddle_xpu-2.3.0rc0-cp37-cp37m-linux_x86_64.whl | ||
``` | ||
|
||
``` | ||
python3.7 -m pip install -U paddlepaddle_xpu-2.3.0rc0-cp37-cp37m-linux_x86_64.whl | ||
``` | ||
|
||
|
||
### 验证安装 | ||
|
||
安装完成后您可以使用 python 或 python3 进入python解释器,输入 | ||
|
||
``` | ||
import paddle | ||
``` | ||
|
||
再输入 | ||
|
||
``` | ||
paddle.utils.run_check() | ||
``` | ||
|
||
如果出现PaddlePaddle is installed successfully!,说明您已成功安装。 | ||
|
||
* 注:支持基于Kermel Primitive算子的昆仑2代芯片编译whl包,[点击这里查看](https://www.kunlunxin.com.cn)。 | ||
|
||
## 安装方式二:从源码编译支持昆仑XPU的包 | ||
|
||
### 环境准备 | ||
|
||
**英特尔CPU+昆仑2代芯片+CentOS系统** | ||
|
||
- **处理器:Intel(R) Xeon(R) Gold 6148 CPU @2.40GHz** | ||
- **操作系统:CentOS 7.8.2003(建议使用CentOS 7)** | ||
- **Python版本: 3.7 (64 bit)** | ||
- **pip或pip3版本:9.0.1+ (64 bit)** | ||
- **cmake版本:3.15+** | ||
- **gcc/g++版本:8.2+** | ||
|
||
|
||
### 源码编译安装步骤: | ||
|
||
|
||
(1)Paddle依赖cmake进行编译构建,需要cmake版本>=3.15,如果操作系统提供的源包括了合适版本的cmake,直接安装即可,否则需要 | ||
|
||
``` | ||
wget https://github.com/Kitware/CMake/releases/download/v3.16.8/cmake-3.16.8.tar.gz | ||
tar -xzf cmake-3.16.8.tar.gz && cd cmake-3.16.8 | ||
./bootstrap && make && sudo make install | ||
``` | ||
|
||
(2)Paddle内部使用patchelf来修改动态库的rpath,如果操作系统提供的源包括了patchelf,直接安装即可,否则需要源码安装,请参考 | ||
|
||
``` | ||
./bootstrap.sh | ||
./configure | ||
make | ||
make check | ||
sudo make install | ||
``` | ||
|
||
(3)根据[requirments.txt](https://github.com/PaddlePaddle/Paddle/blob/develop/python/requirements.txt)安装Python依赖库 | ||
|
||
(4)将Paddle的源代码克隆到当下目录下的Paddle文件夹中,并进入Paddle目录 | ||
|
||
``` | ||
git clone https://github.com/PaddlePaddle/Paddle.git | ||
cd Paddle | ||
``` | ||
|
||
使用较稳定的版本编译,建议切换到release2.3分支下: | ||
|
||
``` | ||
git checkout release/2.3 | ||
``` | ||
|
||
(5)进行Wheel包的编译,请创建并进入一个叫build的目录下 | ||
|
||
``` | ||
mkdir build && cd build | ||
``` | ||
|
||
具体编译选项含义可参见[编译选项表](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/install/Tables.html#Compile) | ||
|
||
**英特尔CPU+昆仑2代芯+CentOS系统** | ||
|
||
链接过程中打开文件数较多,可能超过系统默认限制导致编译出错,设置进程允许打开的最大文件数: | ||
|
||
``` | ||
ulimit -n 4096 | ||
``` | ||
|
||
执行cmake,完成编译 | ||
|
||
Python3.7 | ||
|
||
``` | ||
cmake .. -DPY_VERSION=3.7 \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DWITH_GPU=OFF \ | ||
-DWITH_XPU=ON \ | ||
-DON_INFER=ON \ | ||
-DWITH_PYTHON=ON \ | ||
-DWITH_AVX=ON \ | ||
-DWITH_MKL=ON \ | ||
-DWITH_MKLDNN=ON \ | ||
-DWITH_XPU_BKCL=ON \ | ||
-DWITH_DISTRIBUTE=ON \ | ||
-DWITH_NCCL=OFF | ||
make -j$(nproc) | ||
``` | ||
|
||
(6)编译成功后进入Paddle/build/python/dist目录下找到生成的.whl包 。 | ||
|
||
(7)将生成的.whl包copy至带有昆仑XPU的目标机器上,并在目标机器上根据[requirments.txt](https://github.com/PaddlePaddle/Paddle/blob/develop/python/requirements.txt)安装Python依赖库。(如果编译机器同时为带有昆仑XPU的目标机器,略过此步) | ||
|
||
(8)在带有昆仑XPU的目标机器安装编译好的.whl包:pip install -U(whl包的名字)或pip3 install -U(whl包的名字)。恭喜,至此您已完成昆仑XPU机器上PaddlePaddle的编译安装。 | ||
|
||
**验证安装** | ||
|
||
安装完成后您可以使用 python 或 python3 进入python解释器,输入 | ||
|
||
``` | ||
import paddle | ||
``` | ||
|
||
再输入 | ||
|
||
``` | ||
paddle.utils.run_check() | ||
``` | ||
|
||
如果出现PaddlePaddle is installed successfully!,说明您已成功安装。 | ||
|
||
### 如何卸载 | ||
|
||
使用以下命令卸载PaddlePaddle: | ||
|
||
``` | ||
pip uninstall paddlepaddle | ||
``` | ||
|
||
或 | ||
|
||
``` | ||
pip3 uninstall paddlepaddle | ||
``` | ||
|
||
* 注:支持基于Kermel Primitive算子的昆仑2代芯片源码编译,[点击这里查看](https://www.kunlunxin.com.cn)。 |
Oops, something went wrong.