Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
Browse files Browse the repository at this point in the history
… enable_fc_passes_
  • Loading branch information
paulinagacek committed Sep 22, 2022
2 parents 741b1e9 + 608181a commit cee2e42
Show file tree
Hide file tree
Showing 1,393 changed files with 47,074 additions and 27,559 deletions.
6 changes: 3 additions & 3 deletions .cmake-format.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
29 changes: 29 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# EditorConfig is a cross-editor configuration file
# that helps to unify code styles for multiple
# developers collaborative projects.
# See more at https://editorconfig.org/

root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{c,cc,cxx,cpp,cu,cuh,h,hpp,hxx,kps}]
indent_size = 2

[*.{py,java,r}]
indent_size = 4

[Dockerfile.*]
indent_size = 4

[.flake8]
indent_size = 4

[*.go]
indent_style = tab
indent_size = 4
22 changes: 22 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[flake8]
select = C,E,F,W
exclude = ./build
ignore =
# E, see https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
E101,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,
E201,E202,E203,E221,E225,E226,E228,E231,E241,E251,E261,E262,E265,E266,E271,E272,E275,
E301,E302,E303,E305,E306,
E401,E402,
E501,E502,
E701,E711,E712,E713,E714,E721,E722,E731,E741,

# F, see https://flake8.pycqa.org/en/latest/user/error-codes.html
F401,F402,F403,F404,F405,
F522,F523,F524,F541,
F601,F631,F632,
F811,F821,F823,F841,

# W, see https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
W191,
W503,W504
W601,W605
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/1_bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ body:
attributes:
value: >
#### 在向Paddle报bug之前,请先查询[历史issue](https://github.com/PaddlePaddle/Paddle/issues)是否报过同样的bug。
#### Before submitting a bug, please make sure the issue hasn't been already addressed by searching through [the existing and past issues](https://github.com/PaddlePaddle/Paddle/issues).
- type: textarea
id: code
attributes:
label: bug描述 Describe the Bug
description: |
label: bug描述 Describe the Bug
description: |
请清晰简洁的描述这个bug,最好附上bug复现环境、bug复现步骤及最小代码集,以便我们可以通过运行代码来重现错误。代码片段需要尽可能简洁,请花些时间去掉不相关的代码以帮助我们有效地调试。我们希望通过复制代码并运行得到与你相同的结果,请避免任何外部数据或包含相关的导入等。例如:
```python
# 导入所有必要的库。 All necessary imports at the beginning.
Expand All @@ -27,16 +27,16 @@ body:
b = paddle.rand(shape=[1,4])
a.stop_gradient = False
b.stop_gradient = False
c = paddle.zeros((4, 4))
c[0, :] = a/b
print('Is c requires grad: ', not c.stop_gradient) # 注意:这里出现了bug,期望requires_grad=True
```
如果代码太长,请将可执行代码放到[AIStudio](https://aistudio.baidu.com/aistudio/index)中并将项目设置为公开(或者放到github gist上),请在项目中描述清楚bug复现步骤,在issue中描述期望结果与实际结果。
如果你报告的是一个报错信息,请将完整回溯的报错贴在这里,并使用 ` ```三引号块``` `展示错误信息。
placeholder: |
请清晰简洁的描述这个bug。A clear and concise description of what the bug is.
Expand All @@ -48,8 +48,8 @@ body:
带有完整回溯的报错信息。 The error message you got, with the full traceback.
```
validations:
required: true
required: true

- type: textarea
id: others
attributes:
Expand All @@ -59,7 +59,7 @@ body:
If you have anything else to add, please write it here.
validations:
required: false

- type: markdown
attributes:
value: >
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/2_feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ body:
attributes:
value: >
#### 你可以在这里提出你对Paddle框架的新需求,包括但不限于:功能或模型缺失、功能不全或无法使用、精度/性能不符合预期等。
#### You could submit a request for a new Paddle feature here, including but not limited to: new features or models, incomplete or unusable features, accuracy/performance not as expected, etc.
- type: textarea
id: description
attributes:
Expand All @@ -20,7 +20,7 @@ body:
value: "任务目标(请描述你正在做的项目是什么,如模型、论文、项目是什么?); <br /> 需求场景(请描述你的项目中为什么需要用此功能); <br /> 功能描述(请简单描述或设计这个功能)"
validations:
required: true

- type: textarea
id: alternatives
attributes:
Expand All @@ -30,7 +30,7 @@ body:
A description of any alternative solutions or features you've considered, if any.
validations:
required: false

- type: markdown
attributes:
value: >
Expand Down
32 changes: 16 additions & 16 deletions .github/ISSUE_TEMPLATE/3_build-installation-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ body:
attributes:
value: >
#### 安装请参考[官网文档](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/develop/install/pip/linux-pip.html),若未能解决你的问题,你可以在这里提issue。
#### Before submitting a Build/Installation Issue, please make sure you have visited the [official website](https://www.paddlepaddle.org.cn/documentation/docs/en/install/index_en.html).
#### Before submitting a Build/Installation Issue, please make sure you have visited the [official website](https://www.paddlepaddle.org.cn/documentation/docs/en/install/index_en.html).
- type: textarea
id: error
Expand All @@ -19,7 +19,7 @@ body:
Please describe your problem in detail, and synchronously post the error message, key log/code snippet, and reproduction steps, so that we can quickly troubleshoot the problem.
validations:
required: true

- type: textarea
id: environment
attributes:
Expand All @@ -41,24 +41,24 @@ body:
6. (可选)若安装过程遇到问题,请提供安装方式(pip/conda/docker/源码编译)和相应的安装命令。
7. (可选)若使用paddle过程中,遇到了无法使用gpu相关问题,请在命令行中键入`nvidia-smi`和`nvcc -V`,提供这两个命令输出的截图。
8. (可选)若使用特殊硬件,请单独注明。
placeholder: |
****************************************
Paddle version:
Paddle With CUDA:
OS:
Python version:
CUDA version:
cuDNN version:
Nvidia driver version:
Paddle version:
Paddle With CUDA:
OS:
Python version:
CUDA version:
cuDNN version:
Nvidia driver version:
****************************************
validations:
required: true


- type: markdown
attributes:
value: >
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/4_documentation-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
value: >
#### 请确认反馈的问题来自PaddlePaddle官网文档:https://www.paddlepaddle.org.cn/ 。
#### Before submitting a Documentation Issue, Please make sure that issue is related to https://www.paddlepaddle.org.cn/.
- type: textarea
Expand All @@ -28,12 +28,11 @@ body:
description: |
请告诉我们,你希望如何改进这个文档。或者你可以提个PR修复这个问题。[教程参考](https://github.com/PaddlePaddle/docs/wiki#%E8%B4%A1%E7%8C%AE%E6%96%87%E6%A1%A3)
Please tell us how you would like to improve this document. Or you can submit a PR to fix this problem.
validations:
required: false

- type: markdown
attributes:
value: >
感谢你的贡献 🎉!Thanks for your contribution 🎉!
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/5_ask-a-question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ body:
attributes:
value: >
#### 你可以在这里提出一个使用/咨询问题,提问之前请确保:
- 1)已经百度/谷歌搜索过你的问题,但是没有找到解答;
- 2)已经在官网查询过[API文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html)与[FAQ](https://www.paddlepaddle.org.cn/documentation/docs/zh/faq/index_cn.html),但是没有找到解答;
- 3)已经在[历史issue](https://github.com/PaddlePaddle/Paddle/issues)中搜索过,没有找到同类issue或issue未被解答。
#### You could ask a usage or consultation question here, before your start, please make sure:
- 1) You have searched your question on Baidu/Google, but found no answer;
- 2) You have checked the [API documentation](https://www.paddlepaddle.org.cn/documentation/docs/en/api/index_en.html), but found no answer;
- 3) You have searched [the existing and past issues](https://github.com/PaddlePaddle/Paddle/issues), but found no similar issue or the issue has not been answered.
- type: textarea
id: question
Expand Down
7 changes: 2 additions & 5 deletions .github/ISSUE_TEMPLATE/6_others.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
value: >
#### 你可以在这里提出任何前面几类模板不适用的问题,包括但不限于:优化性建议、框架使用体验反馈、版本兼容性问题、报错信息不清楚等。
#### You can report any issues that are not applicable to the previous types of templates, including but not limited to: enhancement suggestions, feedback on the use of the framework, version compatibility issues, unclear error information, etc.
- type: textarea
Expand All @@ -16,11 +16,8 @@ body:
label: 问题描述 Please describe your issue
validations:
required: true

- type: markdown
attributes:
value: >
感谢你的贡献 🎉! Thanks for your contribution 🎉!
27 changes: 20 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
exclude: |
(?x)^(
patches/.+|
paddle/fluid/framework/fleet/heter_ps/cudf/.+|
paddle/fluid/distributed/ps/thirdparty/round_robin.h
)$
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
rev: v1.1.14
hooks:
- id: remove-crlf
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
- id: remove-tabs
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps)$
args: [--whitespaces-count, '2']
- repo: https://github.com/google/yapf
rev: v0.32.0
hooks:
Expand All @@ -14,17 +22,22 @@ repos:
python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py|
python/paddle/fluid/tests/unittests/dygraph_to_static/test_origin_info.py
)$
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
- id: end-of-file-fixer
- id: sort-simple-yaml
files: (api|backward|api_[a-z_]+)\.yaml$
files: (op|backward|op_[a-z_]+)\.yaml$
- id: trailing-whitespace
files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake|yaml|yml|hook)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists\.txt)$
- repo: local
hooks:
- id: clang-format
Expand All @@ -33,10 +46,6 @@ repos:
entry: bash ./tools/codestyle/clang_format.hook -i
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps)$
exclude: |
(?x)^(
paddle/fluid/distributed/ps/thirdparty/round_robin.h
)$
- repo: local
hooks:
- id: cpplint-cpp-source
Expand All @@ -45,6 +54,10 @@ repos:
entry: bash ./tools/codestyle/cpplint_pre_commit.hook
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$
args:
- --extensions=c,cc,cxx,cpp,cu,cuh,h,hpp,hxx,kps
- --filter=-readability/fn_size,-build/include_what_you_use,-build/c++11,-whitespace/parens
- --quiet
- repo: local
hooks:
- id: pylint-doc-string
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ option(WITH_SYSTEM_BLAS "Use system blas library" OFF)
option(WITH_DISTRIBUTE "Compile with distributed support" OFF)
option(WITH_BRPC_RDMA "Use brpc rdma as the rpc protocal" OFF)
option(ON_INFER "Turn on inference optimization and inference-lib generation"
OFF)
ON)
################################ Internal Configurations #######################################
option(WITH_NV_JETSON "Compile PaddlePaddle with NV JETSON" OFF)
option(WITH_PROFILER "Compile PaddlePaddle with GPU profiler and gperftools"
Expand Down Expand Up @@ -485,6 +485,9 @@ if(WITH_DISTRIBUTE)
ON
CACHE STRING "Enable GLOO when compiling WITH_DISTRIBUTE=ON." FORCE)
endif()
set(WITH_MPI
ON
CACHE STRING "Enable MPI when compiling WITH_DISTRIBUTE=ON." FORCE)
if(WITH_ASCEND_CL AND NOT WITH_ARM_BRPC)
# disable WITH_PSCORE for NPU before include third_party
message(
Expand All @@ -509,6 +512,10 @@ if(WITH_DISTRIBUTE)
endif()
endif()

if(WITH_MPI)
include(mpi)
endif()

include(third_party
)# download, build, install third_party, Contains about 20+ dependencies

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribute Code

You are welcome to contribute to project PaddlePaddle. To contribute to PaddlePaddle, you have to agree with the
You are welcome to contribute to project PaddlePaddle. To contribute to PaddlePaddle, you have to agree with the
[PaddlePaddle Contributor License Agreement](https://gist.github.com/XiaoguangHu01/75018ad8e11af13df97070dd18ae6808).

We sincerely appreciate your contribution. This document explains our workflow and work style.
Expand Down
Loading

0 comments on commit cee2e42

Please sign in to comment.