Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,9 @@ Classfication = "Classfication"
Comparision = "Comparision"
Contructing = "Contructing"
Creenshot = "Creenshot"
DELCARE = "DELCARE"
Dateset = "Dateset"
Discription = "Discription"
Distrbuted = "Distrbuted"
Driect = "Driect"
Embeddding = "Embeddding"
Embeding = "Embeding"
Engish = "Engish"
Fasle = "Fasle"
Flase = "Flase"
Generater = "Generater"
Gloabal = "Gloabal"
Imporvement = "Imporvement"
Expand Down Expand Up @@ -114,20 +107,6 @@ correspoinding = "correspoinding"
corss = "corss"
creatation = "creatation"
creats = "creats"
dafault = "dafault"
datas = "datas"
decribe = "decribe"
decribes = "decribes"
deocder = "deocder"
desgin = "desgin"
desginated = "desginated"
desigin = "desigin"
determinated = "determinated"
diffcult = "diffcult"
dimention = "dimention"
dimentions = "dimentions"
dirrectories = "dirrectories"
disucssion = "disucssion"
egde = "egde"
enviornment = "enviornment"
erros = "erros"
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/static/IpuStrategy_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ set_pipelining_config(self, enable_pipelining, batches_per_step, enable_gradient

- **enable_pipelining** (bool,可选)- 是否使能子图之间的数据流水线。仅支持当 enable_manual_shard=True 时,enable_pipelining 可以置为 True。默认值为 False,表示不使能该功能。
- **batches_per_step** (int,可选)- 指定数据流水线每次运算多少个 batch 的数据。默认值为 1,表示不使能数据流水线功能。
- **enable_gradient_accumulation** (bool,可选)- 是否使能梯度累积,只用于训练模式。默认值为 Flase,表示不使能梯度累积功能。
- **enable_gradient_accumulation** (bool,可选)- 是否使能梯度累积,只用于训练模式。默认值为 False,表示不使能梯度累积功能。
- **accumulation_factor** (int,可选)- 指定累积运算多少个 batch 更新一次权重。默认值为 1,表示不使能权重累积更新功能。

**代码示例**
Expand Down
4 changes: 2 additions & 2 deletions docs/design/concepts/tensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ Before writing code, please make sure you already look through Majel Source Code


### Memory Management
`Allocation` manages a block of memory in device(CPU/GPU). We use `Place` to decribe memory location. The details of memory allocation and deallocation are implememted in `Allocator` and `DeAllocator`. Related low-level API such as `hl_malloc_device()` and `hl_malloc_host()` are provided by Paddle.
`Allocation` manages a block of memory in device(CPU/GPU). We use `Place` to describe memory location. The details of memory allocation and deallocation are implememted in `Allocator` and `DeAllocator`. Related low-level API such as `hl_malloc_device()` and `hl_malloc_host()` are provided by Paddle.

### Dim and Array
#### Dim

`Dim` decribes the dimension information of an array.
`Dim` describes the dimension information of an array.

`DDimVar` is an alias of a specializd class of boost.variant class template.

Expand Down
2 changes: 1 addition & 1 deletion docs/design/data_type/float16.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fp16_tensor.set(tensor.astype(numpy.float16).view(numpy.uint16), GPUPlace)
```

### Consistent API requirement
The basic inference in float16 mode requires users to feed input and obtain output both of float16 data type. However, in this way, the inference APIs are not consistent between float16 mode and float mode, and users may find it confusing and diffcult to use float16 inference since they need to do extra steps to provide float16 input data and convert float16 output data back to float. To have consistent API for different inference modes, we need to transpile the program desc in some way so that we can run float16 inference by feeding and fetching variables of float data type.
The basic inference in float16 mode requires users to feed input and obtain output both of float16 data type. However, in this way, the inference APIs are not consistent between float16 mode and float mode, and users may find it confusing and difficult to use float16 inference since they need to do extra steps to provide float16 input data and convert float16 output data back to float. To have consistent API for different inference modes, we need to transpile the program desc in some way so that we can run float16 inference by feeding and fetching variables of float data type.

This problem can be solved by introducing a type-casting operator which takes an input variable of certain data type, cast it to another specified data type, and put the casted data into the output variable. Insert cast operator where needed can make a program internally run in float16 mode.

Expand Down
2 changes: 1 addition & 1 deletion docs/design/dist_train/mpi_enabled_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ When we do distribute multi GPU training, the communication overhead between ser

We will use OpenMPI API to PaddlePaddle, which can bring two benefits to PaddlePaddle:
1. Enable RDMA with PaddlePaddle, which bring high-performance low latency networks.
2. Enable GPUDriect with PaddlePaddle, which bring the highest throughput and lowest latency GPU read and write.
2. Enable GPUDirect with PaddlePaddle, which bring the highest throughput and lowest latency GPU read and write.

# Change list
* Compile args: Need add compile args to enable MPI support.
Expand Down
2 changes: 1 addition & 1 deletion docs/design/motivation/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Some essential concepts that our API have to provide include:

As a summarization
of
[our disucssion](https://github.com/PaddlePaddle/Paddle/issues/1315),
[our discussion](https://github.com/PaddlePaddle/Paddle/issues/1315),
let us present two examples here:


Expand Down
2 changes: 1 addition & 1 deletion docs/design/others/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ For each parameter, like W and b created by `layer.fc`, marked as double circles

## Block and Graph

The word block and graph are interchangable in the desgin 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.
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.

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

Expand Down
4 changes: 2 additions & 2 deletions docs/design/phi/design_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ class CompatMetaTensor : public phi::MetaTensor {
通过前面介绍的 PT_INFER_META 宏归一化函数形式,然后将`PT_INFER_META(***InferMeta)`包装到一个 functor 中,functor 中先将 InferShapeContext 转换为 InferMetaContext,再调用相应 InferMeta 函数,通过一个宏统一管理代码

```
##define DELCARE_INFER_SHAPE_FUNCTOR(op_type, functor_name, fn) \
##define DECLARE_INFER_SHAPE_FUNCTOR(op_type, functor_name, fn) \
struct functor_name : public paddle::framework::InferShapeBase { \
void operator()( \
paddle::framework::InferShapeContext* ctx) const override { \
Expand Down Expand Up @@ -1176,7 +1176,7 @@ class SignOp : public framework::OperatorWithKernel {
using framework::OperatorWithKernel::OperatorWithKernel;
};

DELCARE_INFER_SHAPE_FUNCTOR(
DECLARE_INFER_SHAPE_FUNCTOR(
sign, SignInferShapeFunctor, PT_INFER_META(phi::UnchangedInferMetaNew));
REGISTER_OPERATOR(sign, ops::SignOp, ops::SignOpMaker<float>,
ops::SignGradMaker<paddle::framework::OpDesc>,
Expand Down
4 changes: 2 additions & 2 deletions docs/design/phi/design_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ Then, in order to transplant the functional `InferMeta` back to the Op architect
Normalize the function form through the `PT_INFER_META` macro, and then wrap `PT_INFER_META(***InferMeta)` into a functor. The functor first converts the `InferShapeContext` to `InferMetaContext`, then calls the corresponding `InferMeta` function, and manages the code uniformly through a macro.

```
##define DELCARE_INFER_SHAPE_FUNCTOR(op_type, functor_name, fn) \
##define DECLARE_INFER_SHAPE_FUNCTOR(op_type, functor_name, fn) \
struct functor_name : public paddle::framework::InferShapeBase { \
void operator()( \
paddle::framework::InferShapeContext* ctx) const override { \
Expand Down Expand Up @@ -1176,7 +1176,7 @@ class SignOp : public framework::OperatorWithKernel {
using framework::OperatorWithKernel::OperatorWithKernel;
};

DELCARE_INFER_SHAPE_FUNCTOR(
DECLARE_INFER_SHAPE_FUNCTOR(
sign, SignInferShapeFunctor, PT_INFER_META(phi::UnchangedInferMetaNew));
REGISTER_OPERATOR(sign, ops::SignOp, ops::SignOpMaker<float>,
ops::SignGradMaker<paddle::framework::OpDesc>,
Expand Down
2 changes: 1 addition & 1 deletion docs/design/quantization/fixed_point_quantization.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ From these formulas, dequantization also can be moved before GEMM, do dequantiza
Figure 2. Equivalent forward in training with simulated quantization.
</p>

We use this equivalent workflow in the training. In our desigin, there is a quantization transpiler to insert the quantization operator and the de-quantization operator in the Fluid `ProgramDesc`. Since the outputs of quantization and de-quantization operator are still in floating point, they are called faked quantization and de-quantization operator. And the training framework is called simulated quantization.
We use this equivalent workflow in the training. In our design, there is a quantization transpiler to insert the quantization operator and the de-quantization operator in the Fluid `ProgramDesc`. Since the outputs of quantization and de-quantization operator are still in floating point, they are called faked quantization and de-quantization operator. And the training framework is called simulated quantization.

#### Backward pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ add_custom_command(TARGET ${PLUGIN_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/python/
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/python/paddle-plugins/
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/lib${PLUGIN_NAME}.so ${CMAKE_CURRENT_BINARY_DIR}/python/paddle-plugins/
COMMENT "Creating plugin dirrectories------>>>"
COMMENT "Creating plugin directories------>>>"
)

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python/.timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ add_custom_command(TARGET ${PLUGIN_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/python/
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/python/paddle-plugins/
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/lib${PLUGIN_NAME}.so ${CMAKE_CURRENT_BINARY_DIR}/python/paddle-plugins/
COMMENT "Creating plugin dirrectories------>>>"
COMMENT "Creating plugin directories------>>>"
)

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python/.timestamp
Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guides/custom_device_docs/custom_runtime_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Device APIs
+---------------------------+----------------------------------------------------------+----------+
| get_device | To get the current device | Y |
+---------------------------+----------------------------------------------------------+----------+
| synchronize_device | To synchronize the desginated device | Y |
| synchronize_device | To synchronize the designated device | Y |
+---------------------------+----------------------------------------------------------+----------+
| get_device_count | To count available devices | Y |
+---------------------------+----------------------------------------------------------+----------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ PADDLE_ENFORCE_EQ(

```c++
PADDLE_ENFORCE(
tmp == *data_type || *data_type == dafault_data_type,
tmp == *data_type || *data_type == default_data_type,
phi::errors::InvalidArgument(
"The DataType of %s Op's duplicable Variable %s must be "
"consistent. The current variable type is (%s), but the "
Expand Down
2 changes: 1 addition & 1 deletion docs/eval/evaluation_of_docs_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ MindSpore 的有自己独立的文档分类标准和风格,所以硬套本文
| 数据加载与预处理 | Images CSV Numpy pandas.DataFrame TFRecord and tf.Example Additional formats with tf.io Text More text loading Classifying structured data with preprocessing layers Classfication on imbalanced data Time series forecasting Decision forest models | 13 | Datasets & Dataloaders | 1 | 数据处理 数据处理(进阶) 自动数据增强 轻量化数据处理 单节点数据缓存 优化数据处理 | 6 | 数据集的定义和加载 数据预处理 | 2 |
| 如何组网 | Modules, layers, and models | 1 | Build the Neural Network Building Models with PyTorch What is torch.nn really? Learing PyTorch with Examples | 4 | 创建网络 网络构建 | 2 | 模型组网 飞桨高层 API 使用指南 层与模型 | 3 |
| 如何训练 | Training loops NumPy API Checkpoint SavedModel | 4 | Optimization Model Parameters Traning wiht PyTorch | 2 | 模型训练 训练与评估 | 2 | 训练与预测验证 自定义指标 | 2 |
| 保存与加载模型 | Save and load Save and load(Distrbuted Training) | 2 | Save and Load the Model | 1 | 保存与加载 | 1 | 模型保存与载入 模型保存及加载(应用实践) | 2 |
| 保存与加载模型 | Save and load Save and load(Distributed Training) | 2 | Save and Load the Model | 1 | 保存与加载 | 1 | 模型保存与载入 模型保存及加载(应用实践) | 2 |
| 可视化、调优技巧 | Overfit and underfit Tune hyperprameters with Keras Tuner Better performance with tf.function Profile TensorFlow performance Graph optimizaition Optimize GPU Performance Mixed precision | 7 | PyTorch TensorBoard Support Model Understanding with Captum Visualizing Models, Data, and Training with TensorBoard Profiling your PyTorch Module PyTorch Profiler with TensorBoard Hyperparameter tuning with Ray Tune Optimizing Vision Transformer Model for Deployment Parametrization Tutorial Pruning Tutorial Grokking PyTorch Intel CPU performance from first principles | 11 | 查看中间文件 Dump 功能调试 自定义调试信息 调用自定义类 算子增量编译 算子调优工具 自动数据加速 固定随机性以复现脚本运行结果 | 8 | VisualDL 工具简介 VisualDL 使用指南 飞桨模型量化 | 3 |
| 自动微分 | Automatic differentiation Advanced autodiff | 2 | Automatic Differentiation with torch.autograd The Fundamentals of Autograd | 2 | 自动微分 | 1 | 自动微分 | 1 |
| 动态图与静态图 | Graphs and functions | 1 | (torchscript 其实是静态图,不过归类到部署中了) | 0 | 动态图与静态图 | 1 | 使用样例 转换原理 支持语法 案例解析 报错调试 动态图 使用动转静完成以图搜图 | 7 |
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/06_distributed_training/data_parallel/amp_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
start_timer() # 获取训练开始时间

for epoch in range(epochs):
datas = zip(train_data, labels)
for i, (data, label) in enumerate(datas):
data = zip(train_data, labels)
for i, (data, label) in enumerate(data):

output = model(data)
loss = mse(output, label)
Expand Down Expand Up @@ -177,8 +177,8 @@
start_timer() # 获取训练开始时间

for epoch in range(epochs):
datas = zip(train_data, labels)
for i, (data, label) in enumerate(datas):
data = zip(train_data, labels)
for i, (data, label) in enumerate(data):

# Step2:创建 AMP 上下文环境,开启自动混合精度训练
with paddle.amp.auto_cast():
Expand Down
12 changes: 6 additions & 6 deletions docs/guides/beginner/tensor_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ Note that no copies happened while broadcasting.

In PaddlePaddle, tensors are broadcastable when following rulrs hold(ref [Numpy Broadcasting](https://numpy.org/doc/stable/user/basics.broadcasting.html#module-numpy.doc.broadcasting)):

1. there should be at least one dimention in each tensor
1. there should be at least one dimension in each tensor
2. when comparing their shapes element-wise from backward to forward, two dimensions are compatible when
they are equal, or one of them is 1, or one of them does not exist.

Expand All @@ -532,10 +532,10 @@ x = paddle.ones((2, 3, 1, 5))
y = paddle.ones((3, 4, 1))

# compare from backward to forward:
# 1st step:y's dimention is 1
# 2nd step:x's dimention is 1
# 3rd step:two dimentions are the same
# 4st step:y's dimention does not exist
# 1st step:y's dimension is 1
# 2nd step:x's dimension is 1
# 3rd step:two dimensions are the same
# 4st step:y's dimension does not exist
# So, x and y are broadcastable
z = x + y
print(z.shape)
Expand All @@ -544,7 +544,7 @@ print(z.shape)
# In Compare
x = paddle.ones((2, 3, 4))
y = paddle.ones((2, 3, 6))
# x and y are not broadcastable because in first step form tail, x's dimention 4 is not equal to y's dimention 6
# x and y are not broadcastable because in first step form tail, x's dimension 4 is not equal to y's dimension 6
# z = x, y
# ValueError: (InvalidArgument) Broadcast dimension mismatch.
```
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/beginner/tensor_index_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ Tensor(shape=[1, 2, 3, 4], dtype=int64, place=Place(cpu), stop_gradient=True,
[16, 17, 18, 19],
[20, 21, 22, 23]]]])

>>> b = a[:, [0,0,1], [1,2,0],:] # the new dimention is at axis 1
>>> b = a[:, [0,0,1], [1,2,0],:] # the new dimension is at axis 1
>>> b
Tensor(shape=[1, 3, 4], dtype=int64, place=Place(cpu), stop_gradient=True,
[[[4 , 5 , 6 , 7 ],
Expand All @@ -369,7 +369,7 @@ Tensor(shape=[1, 3], dtype=int64, place=Place(cpu), stop_gradient=True,
#### 场景 2-高级索引位置不相邻
当高级索引位置不相邻时,则`index`对应产生最终的输出结果会放到第一维上。
```python
>>> d = a[:, [1], :, [2,1,0]] # advanced indexes are not adjacent, the new dimention is at axis 0
>>> d = a[:, [1], :, [2,1,0]] # advanced indexes are not adjacent, the new dimension is at axis 0
>>> d
Tensor(shape=[3, 1, 3], dtype=int64, place=Place(cpu), stop_gradient=True,
[[[14, 18, 22]],
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/flags/memory_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ FLAGS_initial_gpu_memory_in_mb=4096 will allocate 4 GB as initial GPU chunk.
Note
-------
If you set this flag, the memory size set by FLAGS_fraction_of_gpu_memory_to_use will be overrided by this flag, PaddlePaddle will allocate the initial gpu memory with size specified by this flag.
If you don't set this flag, the dafault value 0 will disable this GPU memory strategy. PaddlePaddle will use FLAGS_fraction_of_gpu_memory_to_use to allocate the initial GPU chunk.
If you don't set this flag, the default value 0 will disable this GPU memory strategy. PaddlePaddle will use FLAGS_fraction_of_gpu_memory_to_use to allocate the initial GPU chunk.



Expand Down Expand Up @@ -246,7 +246,7 @@ FLAGS_reallocate_gpu_memory_in_mb=1024 will re-allocate 1 GB if run out of GPU m
Note
-------
If this flag is set, the memory size set by FLAGS_fraction_of_gpu_memory_to_use will be overrided by this flag, PaddlePaddle will re-allocate the gpu memory with size specified by this flag.
If you don't set this flag, the dafault value 0 will disable this GPU memory strategy. PaddlePaddle will use FLAGS_fraction_of_gpu_memory_to_use to re-allocate GPU memory.
If you don't set this flag, the default value 0 will disable this GPU memory strategy. PaddlePaddle will use FLAGS_fraction_of_gpu_memory_to_use to re-allocate GPU memory.


FLAGS_use_pinned_memory
Expand Down
Loading