Skip to content

Commit 9fcd654

Browse files
Merge branch 'develop' into update-cI
2 parents b6cc7cd + 9bc0ec8 commit 9fcd654

File tree

253 files changed

+3191
-2938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+3191
-2938
lines changed

_typos.toml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ feeded = "feeded"
2929

3030
# These words need to be fixed
3131
Learing = "Learing"
32-
Moible = "Moible"
3332
Operaton = "Operaton"
3433
Optimizaing = "Optimizaing"
3534
Optimzier = "Optimzier"
@@ -43,23 +42,9 @@ instrinsics = "instrinsics"
4342
interchangable = "interchangable"
4443
intializers = "intializers"
4544
intput = "intput"
46-
lable = "lable"
47-
learing = "learing"
48-
legth = "legth"
49-
lenth = "lenth"
50-
leran = "leran"
5145
libary = "libary"
52-
mantained = "mantained"
5346
matrics = "matrics"
54-
mdule = "mdule"
55-
mechnism = "mechnism"
56-
memeory = "memeory"
57-
memroy = "memroy"
58-
messege = "messege"
59-
metaphore = "metaphore"
6047
metrices = "metrices"
61-
muliply = "muliply"
62-
mulitplying = "mulitplying"
6348
mutbale = "mutbale"
6449
occurence = "occurence"
6550
opeartor = "opeartor"

ci_scripts/hooks/pre-doc-compile.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,27 @@ else
120120
echo "ERROR: Generated API mapping file not found at $GENERATED_FILE"
121121
handle_failure
122122
fi
123+
124+
python "${APIMAPPING_ROOT}/tools/validate_api_difference_format.py"
125+
126+
# 获取上一条命令的退出状态码
127+
exit_code=$?
128+
129+
# 根据退出状态码决定后续操作
130+
if [ $exit_code -eq 0 ]; then
131+
echo "API DIFFERENCE FORMAT VALIDATE SUCCESS!"
132+
# 在这里继续添加您需要执行的命令
133+
else
134+
echo "ERROR: API DIFFERENCE FORMAT VALIDATE FAILURE! error code: $exit_code" >&2
135+
exit 1
136+
fi
137+
138+
python "${APIMAPPING_ROOT}/tools/validate_pytorch_api_mapping.py" --skip-url-check
139+
exit_code=$?
140+
141+
if [ $exit_code -eq 0 ]; then
142+
echo "PYTORCH API MAPPING VALIDATE SUCCESS!"
143+
else
144+
echo "ERROR: PYTORCH API MAPPING VALIDATE FAILURE! error code: $exit_code" >&2
145+
exit 1
146+
fi

docs/api/paddle/static/accuracy_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ accuracy
1010
1111
accuracy layer。参考 https://en.wikipedia.org/wiki/Precision_and_recall
1212

13-
使用输入和标签计算准确率。如果正确的标签在 topk 个预测值里,则计算结果加 1。注意:输出正确率的类型由 input 类型决定,input 和 lable 的类型可以不一样。
13+
使用输入和标签计算准确率。如果正确的标签在 topk 个预测值里,则计算结果加 1。注意:输出正确率的类型由 input 类型决定,input 和 label 的类型可以不一样。
1414

1515
参数
1616
::::::::::::

docs/design/concurrent/go_op.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ for more details.
218218

219219
#### Green Threads
220220

221-
Golang utilizes `green threads`, which is a mechnism for the runtime library to
221+
Golang utilizes `green threads`, which is a mechanism for the runtime library to
222222
manage multiple threads (instead of natively by the OS). Green threads usually
223223
allows for faster thread creation and switching, as there is less overhead
224224
when spawning these threads. For the first version of CSP, we only support

docs/design/memory/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ I got inspiration from Majel and Caffe2, though above design look different from
116116
117117
### Caffe2
118118
119-
In Caffe2, `Tensor<Context>::mutable_data()` allocates the memroy. In particular, [`Tensor<Context>::mutable_data`](https://github.com/caffe2/caffe2/blob/v0.7.0/caffe2/core/tensor.h#L523) calls [`Tensor<Context>::raw_mutable_data`](https://github.com/caffe2/caffe2/blob/v0.7.0/caffe2/core/tensor.h#L459), which in turn calls [`Context::New`](https://github.com/caffe2/caffe2/blob/v0.7.0/caffe2/core/tensor.h#L479).
119+
In Caffe2, `Tensor<Context>::mutable_data()` allocates the memory. In particular, [`Tensor<Context>::mutable_data`](https://github.com/caffe2/caffe2/blob/v0.7.0/caffe2/core/tensor.h#L523) calls [`Tensor<Context>::raw_mutable_data`](https://github.com/caffe2/caffe2/blob/v0.7.0/caffe2/core/tensor.h#L459), which in turn calls [`Context::New`](https://github.com/caffe2/caffe2/blob/v0.7.0/caffe2/core/tensor.h#L479).
120120
121121
There are two implementations of `Context`:
122122

docs/design/memory/memory_optimization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ In compilers, the front end of the compiler translates programs into an intermed
5353

5454
Therefore, the compiler needs to analyze the intermediate-representation program to determine which temporary variables are in use at the same time. We say a variable is "live" if it holds a value that may be needed in the future, so this analysis is called liveness analysis.
5555

56-
We can leran these techniques from compilers. There are mainly two stages to make live variable analysis:
56+
We can learn these techniques from compilers. There are mainly two stages to make live variable analysis:
5757

5858
- construct a control flow graph
5959
- solve the dataflow equations
@@ -197,7 +197,7 @@ After op1, we can process variable b and variable c; After op2, we can process v
197197

198198
#### memory sharing policy
199199

200-
A memory pool will be mantained in the stage of memory optimization. Each operator node will be scanned to determine memory optimization is done or not. If an operator satisfies the requirement, following policy will be taken to handle input/output variables.
200+
A memory pool will be maintained in the stage of memory optimization. Each operator node will be scanned to determine memory optimization is done or not. If an operator satisfies the requirement, following policy will be taken to handle input/output variables.
201201

202202
```
203203
if op.support_inplace():

docs/design/mkldnn/gru/gru.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ Because oneDNN assumes that all sentences are of equal length, before reorder, w
9999
![](images/input_is_reverse.svg)
100100

101101
* PaddlePaddle WeightX -> oneDNN WeightX\
102-
WeightX does not need custom reorders because memory arrangement is the same for both PP and oneDNN. However, it has to be modified if `origin_mode==false` by mulitplying update gate part by `-1`. At the end, oneDNN reorder is called to convert weights to correct type and strides selected by primitive.
102+
WeightX does not need custom reorders because memory arrangement is the same for both PP and oneDNN. However, it has to be modified if `origin_mode==false` by multiplying update gate part by `-1`. At the end, oneDNN reorder is called to convert weights to correct type and strides selected by primitive.
103103
* PaddlePaddle WeightH -> oneDNN WeightH\
104104
WeightH tensor has different representation in PP and oneDNN. PaddlePaddle stores it as 2 connected blocks of memory, where first contains reset and update gate recurrent weights, and second stores output gate recurrent weights. In oneDNN, these weights are stored in a single memory block of size `[OC, 3, OC]`. Therefore, custom reorder is needed here. After that, if `origin_mode==false`, update gate part is multiplied by `-1`. At the end, oneDNN reorder is called to convert weights to correct type and strides selected by primitive.
105105
![](images/different_tensor_memory_arrangement.svg)
106106
* PaddlePaddle Bias -> oneDNN Bias\
107-
Bias does not require reorder from PP to oneDNN. However, if it is not provided by user, it has to be created and filled with `0.0f` because oneDNN requires it. If it was provided, it has to be modified when `origin_mode==false` by mulitplying update gate part by `-1`. Note: bias is always of `float` data type, even in `int8` and `bfloat16` kernels.
107+
Bias does not require reorder from PP to oneDNN. However, if it is not provided by user, it has to be created and filled with `0.0f` because oneDNN requires it. If it was provided, it has to be modified when `origin_mode==false` by multiplying update gate part by `-1`. Note: bias is always of `float` data type, even in `int8` and `bfloat16` kernels.
108108
* oneDNN TNC/NTC -> PaddlePaddle Output LoD\
109109
After execution of oneDNN GRU primitive, output tensor has to be converted back to PP representation. It is done in the same way as input reorder but in a reverse manner.
110110

docs/design/others/graph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For each parameter, like W and b created by `layer.fc`, marked as double circles
5656

5757
## Block and Graph
5858

59-
The word block and graph are interchangable in the design of PaddlePaddle. A [Block](https://github.com/PaddlePaddle/Paddle/pull/3708) is a metaphore of the code and local variables in a pair of curly braces in programming languages, where operators are like statements or instructions. A graph of operators and variables is a representation of the block.
59+
The word block and graph are interchangable in the design of PaddlePaddle. A [Block](https://github.com/PaddlePaddle/Paddle/pull/3708) is a metaphor of the code and local variables in a pair of curly braces in programming languages, where operators are like statements or instructions. A graph of operators and variables is a representation of the block.
6060

6161
A Block keeps operators in an array `BlockDesc::ops`
6262

docs/dev_guides/custom_device_docs/memory_api_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ It copies synchronous memory in the device.
180180
181181
device - the device to be used
182182
183-
dst - the address of the destination device memroy
183+
dst - the address of the destination device memory
184184
185185
src - the address of the source device memory
186186

docs/eval/evaluation_of_docs_system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ TensorFlow 的文档规划,比较直接地匹配了本文所介绍的分类标
271271
- Training Transformer models using Pipeline Parallelism
272272
- Training Transformer models using Distributed Data Parallel and Pipeline Parallelism
273273
- Distributed Training with Uneven Inputs Using the Join Context Manager
274-
- Moible
274+
- Mobile
275275
- Image Segmentation DeepLabV3 on iOS
276276
- Image Segmentation DeepLabV3 on Android
277277
- Recommendation Systems

0 commit comments

Comments
 (0)