Skip to content

Commit d38b03b

Browse files
authored
Fix contribution guides index (#4943)
* Update release_note_cn.md * Update release_note_en.md * Update release_note_en.md * Update release_note_cn.md * Update release_note_cn.md * Update release_note_en.md * mv kp index * fix image url
1 parent 9106243 commit d38b03b

32 files changed

+10
-16
lines changed

docs/dev_guides/index_cn.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
- `Git 操作指南 <./git_guides/index_cn.html>`_ : Git 操作相关说明与Paddle CI 手册。
1212
- `编译安装 <https://www.paddlepaddle.org.cn/documentation/docs/zh/install/compile/fromsource.html>`_ : 如何从源码编译安装Paddle。
1313
- `API开发指南 <./api_contributing_guides/api_contributing_guides_cn.html>`_ : API开发相关说明。
14-
- `Kernel Primitives API <./kernel_primitive_api/index_cn.html>`_ : 介绍 PaddlePaddle 为加快算子开发提供的 Block 级 CUDA 函数
14+
- `算子性能优化贡献指南 <./op_optimization/op_optimization_contributing_guides_cn.html>`_ : 飞桨算子性能优化相关说明
1515
- `曙光开发指南 <./sugon/index_cn.html>`_ : 曙光开发相关说明。
1616
- `自定义新硬件接入指南 <./custom_device_docs/index_cn.html>`_: 介绍如何通过自定义硬件功能为飞桨接入新硬件后端。
1717
- `文档贡献指南 <./docs_contributing_guides_cn.html>`_ : 飞桨文档贡献指南。
18-
- `算子性能优化贡献指南 <./op_optimization/op_optimization_contributing_guides_cn.html>`_ : 飞桨算子性能优化相关说明。
18+
1919

2020
.. toctree::
2121
:hidden:
@@ -24,8 +24,8 @@
2424
style_guides_cn.md
2525
git_guides/index_cn.rst
2626
api_contributing_guides/api_contributing_guides_cn.rst
27-
kernel_primitive_api/index_cn.rst
27+
op_optimization/op_optimization_contributing_guides_cn.rst
2828
sugon/index_cn.rst
2929
custom_device_docs/index_cn.rst
3030
docs_contributing_guides_cn.md
31-
op_optimization/op_optimization_contributing_guides_cn.rst
31+

docs/dev_guides/op_optimization/op_optimization_contributing_guides_cn.rst

+1
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,4 @@
9999

100100
op_optimization_method_introduction_cn.md
101101
op_optimization_accpetance_criteria_cn.md
102+
kernel_primitive_api/index_cn.rst

docs/dev_guides/op_optimization/op_optimization_method_introduction_cn.md

+5-12
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,23 @@ GPU Kernel直接影响了算子性能, 我们推荐采用以下等通用优化
3333

3434
我们推荐结合OP的使用场景设计对于的线程配置策略,如下图所示[IndexSample OP](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/index_sample_cn.html#index-sample)常用于处理2维数据, 因此使用[2维的线程配置策略](https://github.com/PaddlePaddle/Paddle/blob/30838aa698d6f3f3b0860b052f6a50ef53ac6784/paddle/phi/kernels/gpu/index_sample_kernel.cu#L82-L91)相对比1维配置策略,性能可提升20%左右。
3535

36-
<figure align="center">
37-
<img src="../images/index_sample.png" width=80% height=80%/>
38-
<figcaption><center>图1. IndexSample OP 线程配置策略</center></figcaption>
39-
</figure>
36+
<img src="https://raw.githubusercontent.com/PaddlePaddle/docs/develop/docs/dev_guides/images/index_sample.png" style="zoom:50%" />
37+
4038

4139
优化GPU Kernel中的线程配置策略, 涵盖一维、二维、三维线程配置策略, 目前已经在`Elementwise`, `Stack`, `IndexSample`等OP中使用.
4240

4341
### 2.2 [Warp计算优化](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/phi/kernels/funcs/math_cuda_utils.h)
4442

4543
飞桨内对上文中提到的**Warp级操作**进行了封装, 提供了简易的调用接口, 开发者可调用接口快速获得Warp内或者Block内的全部数据的求和、最大值、最小值.
4644

47-
<figure align="center">
48-
<img src="../images/cuda_math_utils.png" width=80% height=80%/>
49-
<figcaption><center>图2. Warp级操作封装</center></figcaption>
50-
</figure>
45+
<img src="https://raw.githubusercontent.com/PaddlePaddle/docs/develop/docs/dev_guides/images/cuda_math_utils.png" style="zoom:50%" />
46+
5147

5248
### 2.3 [索引计算优化](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/fluid/platform/fast_divmod.h):
5349

5450
当GPU Kernel的索引计算中存在除法或取模操作, 将在导致汇编层面计算开销变大, 我们建议采用快速除法优化这部分的计算开销。飞桨内[Pooling OP](https://github.com/PaddlePaddle/Paddle/blob/890c73158f663b327be7664ed6c4d08fb2c236a9/paddle/phi/kernels/funcs/pooling.cu#L41-L101) 采用索引优化计算后, 性能提升1倍.
5551

56-
<figure align="center">
57-
<img src="../images/fast_divmod.png" width=50% height=50%/>
58-
<figcaption><center>图3. 快速整型除法操作</center></figcaption>
59-
</figure>
52+
<img src="https://raw.githubusercontent.com/PaddlePaddle/docs/develop/docs/dev_guides/images/fast_divmod.png" style="zoom:50%" />
6053

6154
### 2.4 [Kps优化工具库](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/kernel_primitive_api/index_cn.html)
6255

0 commit comments

Comments
 (0)