Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into logcumsumexp
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaishaonvjituizi committed Jun 7, 2022
2 parents 4601d17 + 42dd0f1 commit 250998c
Show file tree
Hide file tree
Showing 6,331 changed files with 149,127 additions and 101,067 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
125 changes: 125 additions & 0 deletions .cmake-format.py
@@ -0,0 +1,125 @@
# 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.
# See the License for the specific language governing permissions and
# limitations under the License.

# -----------------------------
# Options affecting formatting.
# -----------------------------
with section("format"):

# How wide to allow formatted cmake files
line_width = 80

# ------------------------------------------------
# Options affecting comment reflow and formatting.
# ------------------------------------------------
with section("markup"):
# enable comment markup parsing and reflow
enable_markup = False

# If comment markup is enabled, don't reflow the first comment block in each
# listfile. Use this to preserve formatting of your copyright/license
# statements.
first_comment_is_literal = True

# ----------------------------------
# Options affecting listfile parsing
# ----------------------------------
with section("parse"):
# Additional FLAGS and KWARGS for custom commands
additional_commands = {
"cc_library": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"nv_library": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"hip_library": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"xpu_library": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"hip_library": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"hip_library": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"go_library": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"copy": {
"kwargs": {
"SRCS": '*',
"DSTS": '*',
}
},
"cc_test": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"nv_test": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"hip_test": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"xpu_test": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"go_test": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
},
"py_test": {
"kwargs": {
"SRCS": '*',
"DEPS": '*',
}
}
}
139 changes: 136 additions & 3 deletions .pre-commit-config.yaml
@@ -1,14 +1,19 @@
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
sha: v1.0.1
rev: v1.1.14
hooks:
- id: remove-crlf
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
- repo: https://github.com/PaddlePaddle/mirrors-yapf.git
sha: 0d79c0c469bab64f7229c9aca2b1186ef47f0e37
- repo: https://github.com/google/yapf
rev: v0.32.0
hooks:
- id: yapf
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
exclude: |
(?x)^(
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/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
Expand All @@ -28,6 +33,10 @@ repos:
entry: bash ./tools/codestyle/clang_format.hook -i
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|xpu|kps)$
exclude: |
(?x)^(
paddle/fluid/distributed/ps/thirdparty/round_robin.h
)$
- repo: local
hooks:
- id: cpplint-cpp-source
Expand Down Expand Up @@ -55,3 +64,127 @@ repos:
(?x)^(
paddle/utils/.*
)$
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
# exclude paddle/fluid/operators/CMakeLists.txt, see the comment
# https://github.com/PaddlePaddle/Paddle/pull/43057#pullrequestreview-993471860
exclude: |
(?x)^(
paddle/fluid/operators/CMakeLists.txt
)$
- repo: https://github.com/cmake-lint/cmake-lint
rev: 1.4.2
hooks:
- id: cmakelint
args: [--config=./tools/codestyle/.cmakelintrc]
# exclude files which need to be fixed
exclude: |
(?x)^(
cmake/generic.cmake|
CMakeLists.txt|
paddle/fluid/pybind/CMakeLists.txt|
python/paddle/fluid/tests/unittests/CMakeLists.txt|
paddle/fluid/eager/auto_code_generator/CMakeLists.txt|
paddle/fluid/framework/CMakeLists.txt|
paddle/fluid/eager/auto_code_generator/final_state_generator/CMakeLists.txt|
cmake/third_party.cmake|
paddle/fluid/inference/tests/infer_ut/CMakeLists.txt|
cmake/configure.cmake|
paddle/fluid/inference/api/demo_ci/CMakeLists.txt|
cmake/flags.cmake|
cmake/inference_lib.cmake|
cmake/external/protobuf.cmake|
cmake/system.cmake|
cmake/cudnn.cmake|
cmake/external/mkldnn.cmake|
cmake/unity_build.cmake|
paddle/fluid/framework/fleet/CMakeLists.txt|
paddle/fluid/inference/CMakeLists.txt|
paddle/fluid/inference/tests/api/CMakeLists.txt|
paddle/fluid/operators/CMakeLists.txt|
paddle/phi/api/lib/CMakeLists.txt|
cmake/external/gflags.cmake|
cmake/external/lite.cmake|
cmake/external/poplar.cmake|
cmake/python_module.cmake|
python/paddle/fluid/tests/unittests/asp/CMakeLists.txt|
cmake/cuda.cmake|
cmake/FindNumPy.cmake|
cmake/phi.cmake|
paddle/fluid/framework/ir/CMakeLists.txt|
paddle/fluid/platform/CMakeLists.txt|
python/paddle/fluid/tests/unittests/mlu/CMakeLists.txt|
python/paddle/tests/CMakeLists.txt|
cmake/ccache.cmake|
cmake/coveralls.cmake|
cmake/external/glog.cmake|
cmake/external/onnxruntime.cmake|
cmake/external/openblas.cmake|
cmake/external/xpu.cmake|
cmake/hip.cmake|
paddle/fluid/distributed/CMakeLists.txt|
paddle/fluid/framework/details/CMakeLists.txt|
paddle/fluid/imperative/CMakeLists.txt|
paddle/fluid/inference/analysis/ir_passes/CMakeLists.txt|
paddle/fluid/inference/api/CMakeLists.txt|
paddle/fluid/operators/controlflow/CMakeLists.txt|
python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt|
cmake/cblas.cmake|
cmake/coverallsGcovJsons.cmake|
cmake/external/brpc.cmake|
cmake/external/cryptopp.cmake|
cmake/external/gtest.cmake|
cmake/external/llvm.cmake|
cmake/external/utf8proc.cmake|
cmake/external/warpctc.cmake|
cmake/external/zlib.cmake|
cmake/FindGperftools.cmake|
cmake/operators.cmake|
cmake/tensorrt.cmake|
paddle/fluid/inference/api/details/CMakeLists.txt|
python/paddle/fluid/tests/unittests/xpu/CMakeLists.txt|
cmake/external/arm_brpc.cmake|
cmake/external/concurrentqueue.cmake|
cmake/external/eigen.cmake|
cmake/external/mklml.cmake|
cmake/external/paddle2onnx.cmake|
cmake/miopen.cmake|
cmake/nccl.cmake|
cmake/simd.cmake|
paddle/fluid/distributed/fleet_executor/CMakeLists.txt|
paddle/fluid/eager/api/generated/fluid_generated/forwards/CMakeLists.txt|
paddle/fluid/framework/io/CMakeLists.txt|
paddle/fluid/imperative/tests/CMakeLists.txt|
paddle/fluid/inference/analysis/CMakeLists.txt|
paddle/fluid/inference/tests/infer_ut/external-cmake/gtest-cpp.cmake|
paddle/fluid/memory/allocation/CMakeLists.txt|
paddle/fluid/memory/CMakeLists.txt|
paddle/fluid/operators/cinn/CMakeLists.txt|
paddle/fluid/operators/collective/CMakeLists.txt|
paddle/fluid/operators/ipu/CMakeLists.txt|
paddle/fluid/operators/jit/CMakeLists.txt|
paddle/fluid/operators/pscore/CMakeLists.txt|
paddle/fluid/platform/device/ipu/CMakeLists.txt|
paddle/fluid/platform/dynload/CMakeLists.txt|
paddle/infrt/external_kernels/CMakeLists.txt|
paddle/infrt/kernel/phi/CMakeLists.txt|
paddle/phi/backends/dynload/CMakeLists.txt|
paddle/phi/CMakeLists.txt|
paddle/phi/kernels/CMakeLists.txt|
paddle/phi/tests/core/CMakeLists.txt|
python/CMakeLists.txt|
python/paddle/fluid/contrib/slim/tests/CMakeLists.txt|
python/paddle/fluid/tests/unittests/autograd/CMakeLists.txt|
python/paddle/fluid/tests/unittests/distribution/CMakeLists.txt|
python/paddle/fluid/tests/unittests/dygraph_to_static/CMakeLists.txt|
python/paddle/fluid/tests/unittests/fft/CMakeLists.txt|
python/paddle/fluid/tests/unittests/ipu/CMakeLists.txt|
python/paddle/fluid/tests/unittests/mkldnn/CMakeLists.txt|
python/paddle/fluid/tests/unittests/npu/CMakeLists.txt|
python/paddle/fluid/tests/unittests/ps/CMakeLists.txt|
python/paddle/fluid/tests/unittests/rnn/CMakeLists.txt|
python/paddle/fluid/tests/unittests/sequence/CMakeLists.txt
)$

0 comments on commit 250998c

Please sign in to comment.