Skip to content

Commit a55ebac

Browse files
committed
fix
2 parents 9c7f5dc + 12ecf2e commit a55ebac

File tree

4,787 files changed

+185561
-151483
lines changed

Some content is hidden

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

4,787 files changed

+185561
-151483
lines changed

.editorconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ insert_final_newline = true
1515
[*.{c,cc,cxx,cpp,cu,cuh,h,hpp,hxx,kps}]
1616
indent_size = 2
1717

18-
[*.{py,java,r}]
18+
[*.{py,pyi,java,r,toml}]
1919
indent_size = 4
2020

2121
[Dockerfile.*]
2222
indent_size = 4
2323

24-
[.flake8]
25-
indent_size = 4
26-
2724
[*.go]
2825
indent_style = tab
2926
indent_size = 4

.github/CODEOWNERS

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This file is migrated from CI script, it's an effort of modenizing our dev infra.
2+
# Code owners are expected to take responsibility for review patches to respective file.
3+
4+
/CMakeLists.txt @wanghuancoder @Aurelius84 @XiaoguangHu01 @qili93
5+
paddle/fluid/eager/autograd_meta.cc @JiabinYang @phlrain
6+
paddle/fluid/eager/autograd_meta.h @JiabinYang @phlrain
7+
paddle/fluid/eager/backward.cc @JiabinYang @phlrain
8+
paddle/fluid/eager/backward.h @JiabinYang @phlrain
9+
paddle/fluid/eager/grad_node_info.cc @JiabinYang @phlrain
10+
paddle/fluid/eager/grad_node_info.h @JiabinYang @phlrain
11+
paddle/fluid/eager/grad_tensor_holder.cc @JiabinYang @phlrain
12+
paddle/fluid/eager/grad_tensor_holder.h @JiabinYang @phlrain
13+
paddle/fluid/eager/tensor_wrapper.h @JiabinYang @phlrain
14+
paddle/fluid/framework/block_desc.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
15+
paddle/fluid/framework/details/op_registry.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
16+
paddle/fluid/framework/framework.proto @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
17+
paddle/fluid/framework/grad_op_desc_maker.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
18+
paddle/fluid/framework/ir/graph.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
19+
paddle/fluid/framework/ir/node.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
20+
paddle/fluid/framework/lod_tensor.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
21+
paddle/fluid/framework/op_desc.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
22+
paddle/fluid/framework/operator.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
23+
paddle/fluid/framework/scope.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
24+
paddle/fluid/framework/selected_rows.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
25+
paddle/fluid/framework/tensor.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
26+
paddle/fluid/framework/unused_var_check.cc @zhiqiu @phlrain
27+
paddle/fluid/framework/var_desc.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
28+
paddle/fluid/operators/distributed/send_recv.proto.in @gongweibao @seiriosPlus
29+
paddle/fluid/prim/api/api.yaml @cxxly @xiaoguoguo626807 @Charles-hit @cyber-pioneer @JiabinYang
30+
paddle/fluid/prim/api/composite_backward/composite_backward_api.h @cxxly @xiaoguoguo626807 @Charles-hit @cyber-pioneer @JiabinYang
31+
paddle/fluid/prim/api/composite_backward/composite_double_backward_api.h @cxxly @xiaoguoguo626807 @Charles-hit @cyber-pioneer @JiabinYang
32+
paddle/fluid/prim/api/manual_prim/prim_manual_api.h @cxxly @xiaoguoguo626807 @Charles-hit @cyber-pioneer @JiabinYang
33+
paddle/phi/api/include/tensor.h @phlrain @zyfncg @YuanRisheng
34+
paddle/phi/core/attribute.h @phlrain @zyfncg @YuanRisheng
35+
paddle/phi/core/dense_tensor.h @phlrain @zyfncg @YuanRisheng
36+
paddle/phi/core/device_context.h @phlrain @zyfncg @YuanRisheng
37+
paddle/phi/core/infermeta_utils.h @phlrain @zyfncg @YuanRisheng
38+
paddle/phi/core/kernel_context.h @phlrain @zyfncg @YuanRisheng
39+
paddle/phi/core/kernel_factory.h @phlrain @zyfncg @YuanRisheng
40+
paddle/phi/core/kernel_registry.h @phlrain @zyfncg @YuanRisheng
41+
paddle/phi/core/kernel_utils.h @phlrain @zyfncg @YuanRisheng
42+
paddle/phi/core/meta_tensor.h @phlrain @zyfncg @YuanRisheng
43+
paddle/phi/core/tensor_base.h @phlrain @zyfncg @YuanRisheng
44+
paddle/phi/core/tensor_meta.h @phlrain @zyfncg @YuanRisheng
45+
paddle/phi/infermeta/spmd_rules @LiYuRio @ForFishes @zhiqiu
46+
paddle/scripts/paddle_build.bat @zhwesky2010 @wanghuancoder @Aurelius84
47+
paddle/scripts/paddle_build.sh @risemeup1 @zhangbo9674 @XieYunshen
48+
pyproject.toml @SigureMo @gouzil
49+
python/paddle/autograd/backward_utils.py @Aurelius84 @cxxly @xiaoguoguo626807 @changeyoung98
50+
python/paddle/autograd/ir_backward.py @Aurelius84 @cxxly @xiaoguoguo626807 @changeyoung98
51+
python/paddle/base/backward.py @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
52+
python/paddle/base/compiler.py @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
53+
python/paddle/base/dygraph/layers.py @JiabinYang @phlrain
54+
python/paddle/base/framework.py @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
55+
python/paddle/base/__init__.py @phlrain @Aurelius84 @qili93
56+
python/paddle/base/parallel_executor.py @Xreki @zhhsplendid @Aurelius84
57+
python/paddle/base/tests/unittests/white_list/check_op_sequence_batch_1_input_white_list.py @Aurelius84 @phlrain
58+
python/paddle/base/tests/unittests/white_list/check_op_sequence_instance_0_input_white_list.py @Aurelius84 @phlrain
59+
python/paddle/base/tests/unittests/white_list/check_shape_white_list.py @hong19860320 @Aurelius84 @phlrain
60+
python/paddle/base/tests/unittests/white_list/compile_vs_runtime_white_list.py @Aurelius84 @phlrain
61+
python/paddle/base/tests/unittests/white_list/no_check_set_white_list.py @Aurelius84 @phlrain
62+
python/paddle/base/tests/unittests/white_list/no_grad_set_white_list.py @Aurelius84 @phlrain
63+
python/paddle/base/tests/unittests/white_list/op_accuracy_white_list.py @juncaipeng @zhangting2020 @Aurelius84
64+
python/paddle/base/tests/unittests/white_list/op_threshold_white_list.py @juncaipeng @zhangting2020 @Aurelius84
65+
python/paddle/distributed/fleet/__init__.py @sneaxiy @raindrops2sea
66+
python/paddle/distributed/fleet/launch.py @sneaxiy @raindrops2sea
67+
python/paddle/distributed/__init__.py @sneaxiy @raindrops2sea
68+
python/paddle/incubate/autograd/composite_rules.py @cyber-pioneer @xiaoguoguo626807 @Charles-hit @JiabinYang
69+
python/paddle/incubate/autograd/primitives.py @cyber-pioneer @xiaoguoguo626807 @Charles-hit @JiabinYang
70+
python/paddle/_typing @SigureMo @zrr1999 @gouzil
71+
python/requirements.txt @phlrain @jzhang533 @kolinwei
72+
test/dygraph_to_static @SigureMo @Aurelius84 @gouzil
73+
test/sot @SigureMo @Aurelius84 @gouzil
74+
tools/parallel_UT_rule.py @zhwesky2010 @wanghuancoder @Aurelius84
75+
tools/windows/run_unittests.sh @zhwesky2010 @wanghuancoder @Aurelius84
76+
.pre-commit-config.yaml @SigureMo @gouzil

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ paddle/fluid/operators/generated_sparse_op.cc
8787
paddle/fluid/operators/generated_static_op.cc
8888
paddle/fluid/operators/generated_fused_op.cc
8989
paddle/fluid/operators/ops_signature/generated_*.cc
90-
paddle/phi/api/yaml/parsed_apis/
91-
paddle/fluid/operators/generator/parsed_ops/
9290
paddle/fluid/pybind/tmp_eager_op_function_impl.h
9391
paddle/fluid/pybind/eager_op_function_impl.h
9492
paddle/fluid/pybind/eager_op_function_impl.h
@@ -107,3 +105,4 @@ paddle/phi/kernels/fusion/cutlass/cutlass_kernels/fpA_intB_gemm/autogen/*
107105
paddle/phi/kernels/fusion/cutlass/cutlass_kernels/fpA_intB_gemm/autogen_tmp/*
108106
paddle/fluid/pybind/static_op_function.*
109107
paddle/fluid/pybind/ops_api.cc
108+
python/paddle/tensor/tensor.pyi

.gitmodules

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
path = third_party/xbyak
7171
url = https://github.com/herumi/xbyak.git
7272
ignore = dirty
73-
[submodule "third_party/mkldnn"]
74-
path = third_party/mkldnn
73+
[submodule "third_party/onednn"]
74+
path = third_party/onednn
7575
url = https://github.com/oneapi-src/oneDNN.git
7676
ignore = dirty
7777
[submodule "third_party/flashattn"]
@@ -118,3 +118,7 @@
118118
path = third_party/cryptopp-cmake
119119
url = https://github.com/noloader/cryptopp-cmake.git
120120
ignore = dirty
121+
[submodule "third_party/nlohmann_json"]
122+
path = third_party/nlohmann_json
123+
url = https://github.com/nlohmann/json.git
124+
ignore = dirty

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ repos:
4242
hooks:
4343
- id: copyright_checker
4444
name: copyright_checker
45-
entry: python ./tools/codestyle/copyright.hook
45+
entry: python ./tools/codestyle/copyright.py
4646
language: system
47-
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|xpu|kps|py|sh)$
47+
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|xpu|kps|py|pyi|sh)$
4848
exclude: |
4949
(?x)^(
5050
paddle/utils/.*|
@@ -57,7 +57,7 @@ repos:
5757
- id: black
5858
files: (.*\.(py|pyi|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
5959
- repo: https://github.com/astral-sh/ruff-pre-commit
60-
rev: v0.3.0
60+
rev: v0.3.5
6161
hooks:
6262
- id: ruff
6363
args: [--fix, --exit-non-zero-on-fix, --no-cache]
@@ -67,15 +67,15 @@ repos:
6767
- id: clang-format
6868
name: clang-format
6969
description: Format files with ClangFormat.
70-
entry: bash ./tools/codestyle/clang_format.hook -i
70+
entry: bash ./tools/codestyle/clang_format.sh -i
7171
language: system
7272
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps)$
7373
- repo: local
7474
hooks:
7575
- id: cpplint-cpp-source
7676
name: cpplint
7777
description: Check C++ code style using cpplint.py.
78-
entry: bash ./tools/codestyle/cpplint_pre_commit.hook
78+
entry: bash ./tools/codestyle/cpplint_pre_commit.sh
7979
language: system
8080
files: \.(cc|cxx|cpp|cu|h|hpp|hxx)$
8181
args:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ option(WITH_PIP_CUDA_LIBRARIES
6868
"Paddle uses the CUDA library provided by NVIDIA" OFF)
6969
option(WITH_NIGHTLY_BUILD
7070
"Compile nightly paddle whl package of the develop branch" OFF)
71+
option(WITH_CPP_TEST "Compile PaddlePaddle skip cpp test" ON)
7172
find_package(Git REQUIRED)
7273

7374
# config GIT_URL with github mirrors to speed up dependent repos clone
@@ -306,7 +307,6 @@ option(
306307
SANITIZER_TYPE
307308
"Choose the type of sanitizer, options are: Address, Leak, Memory, Thread, Undefined"
308309
OFF)
309-
option(WITH_LITE "Compile Paddle Fluid with Lite Engine" OFF)
310310
option(WITH_CINN "Compile PaddlePaddle with CINN" OFF)
311311
option(WITH_NCCL "Compile PaddlePaddle with NCCL support" ON)
312312
option(WITH_RCCL "Compile PaddlePaddle with RCCL support" ON)

ISSUE_TEMPLATE.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

cmake/cblas.cmake

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
# Find the CBlas and lapack libraries
1616
#
1717
# It will search MKLML, OpenBlas, reference-cblas, extern-openblas in order.
18+
# On APPLE, accelerate framework (apple's blas implementation) will be
19+
# used, if applicable.
1820
#
1921
# If any cblas implementation found, the following variable will be set.
20-
# CBLAS_PROVIDER # one of MKLML, OPENBLAS, REFERENCE
22+
# CBLAS_PROVIDER # one of MKLML, ACCELERATE, OPENBLAS, REFERENCE
2123
# CBLAS_INC_DIR # the include directory for cblas.
2224
# CBLAS_LIBS # a list of libraries should be linked by paddle.
2325
# # Each library should be full path to object file.
@@ -45,6 +47,24 @@ if(WITH_MKLML)
4547
"(include: ${CBLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
4648
endif()
4749

50+
## find accelerate on apple
51+
if(APPLE AND NOT DEFINED CBLAS_PROVIDER)
52+
find_library(ACCELERATE_FRAMEWORK Accelerate)
53+
if(ACCELERATE_FRAMEWORK)
54+
message(STATUS "Accelerate framework found " "${ACCELERATE_FRAMEWORK}")
55+
56+
set(CBLAS_PROVIDER ACCELERATE)
57+
# no need to setup include dir if it's accelerate
58+
# set(CBLAS_INC_DIR "")
59+
set(CBLAS_LIBRARIES ${ACCELERATE_FRAMEWORK})
60+
61+
add_definitions(-DPADDLE_USE_ACCELERATE)
62+
add_definitions(-DLAPACK_FOUND)
63+
else()
64+
message(WARNING "Accelerate framework not found")
65+
endif()
66+
endif()
67+
4868
## Then find openblas.
4969
if(NOT DEFINED CBLAS_PROVIDER)
5070
set(OPENBLAS_ROOT

cmake/cinn.cmake

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ if(WITH_MKL)
5959
add_dependencies(cinn_mklml ${MKLML_PROJECT})
6060
add_definitions(-DCINN_WITH_MKL_CBLAS)
6161
endif()
62-
if(WITH_MKLDNN)
62+
if(WITH_ONEDNN)
6363
add_definitions(-DCINN_WITH_DNNL)
6464
endif()
6565

@@ -164,6 +164,8 @@ cinn_cc_library(
164164
isl
165165
ginac
166166
pybind
167+
op_fusion
168+
cinn_op_dialect
167169
${jitify_deps})
168170
add_dependencies(cinnapi GEN_LLVM_RUNTIME_IR_HEADER ZLIB::ZLIB)
169171
add_dependencies(cinnapi GEN_LLVM_RUNTIME_IR_HEADER ${core_deps})
@@ -175,9 +177,9 @@ target_link_libraries(cinnapi ${PYTHON_LIBRARIES})
175177
if(WITH_MKL)
176178
target_link_libraries(cinnapi cinn_mklml)
177179
add_dependencies(cinnapi cinn_mklml)
178-
if(WITH_MKLDNN)
179-
target_link_libraries(cinnapi ${MKLDNN_LIB})
180-
add_dependencies(cinnapi ${MKLDNN_PROJECT})
180+
if(WITH_ONEDNN)
181+
target_link_libraries(cinnapi ${ONEDNN_LIB})
182+
add_dependencies(cinnapi ${ONEDNN_PROJECT})
181183
endif()
182184
endif()
183185

@@ -220,21 +222,25 @@ function(gen_cinncore LINKTYPE)
220222
schedule_desc_proto
221223
absl
222224
isl
223-
ginac)
225+
ginac
226+
pybind
227+
op_fusion
228+
cinn_op_dialect
229+
${jitify_deps})
224230
add_dependencies(${CINNCORE_TARGET} GEN_LLVM_RUNTIME_IR_HEADER ZLIB::ZLIB)
225231
add_dependencies(${CINNCORE_TARGET} GEN_LLVM_RUNTIME_IR_HEADER ${core_deps})
226232
target_link_libraries(${CINNCORE_TARGET} op_dialect pir phi)
227233
add_dependencies(${CINNCORE_TARGET} op_dialect pir phi)
228234

229-
add_dependencies(${CINNCORE_TARGET} pybind)
235+
# add_dependencies(${CINNCORE_TARGET} pybind)
230236
target_link_libraries(${CINNCORE_TARGET} ${PYTHON_LIBRARIES})
231237

232238
if(WITH_MKL)
233239
target_link_libraries(${CINNCORE_TARGET} cinn_mklml)
234240
add_dependencies(${CINNCORE_TARGET} cinn_mklml)
235-
if(WITH_MKLDNN)
236-
target_link_libraries(${CINNCORE_TARGET} ${MKLDNN_LIB})
237-
add_dependencies(${CINNCORE_TARGET} ${MKLDNN_PROJECT})
241+
if(WITH_ONEDNN)
242+
target_link_libraries(${CINNCORE_TARGET} ${ONEDNN_LIB})
243+
add_dependencies(${CINNCORE_TARGET} ${ONEDNN_PROJECT})
238244
endif()
239245
endif()
240246

@@ -247,16 +253,16 @@ function(gen_cinncore LINKTYPE)
247253
${CUBLAS}
248254
${CUDNN}
249255
${CURAND}
250-
${CUSOLVER}
251-
${jitify_deps})
256+
${CUSOLVER})
257+
# ${jitify_deps})
252258
if(NVTX_FOUND)
253259
target_link_libraries(${CINNCORE_TARGET} ${CUDA_NVTX_LIB})
254260
endif()
255261
endif()
256262

257263
if(WITH_CUTLASS)
258-
target_link_libraries(cinnapi cutlass)
259-
add_dependencies(cinnapi cutlass)
264+
target_link_libraries(${CINNCORE_TARGET} cutlass)
265+
add_dependencies(${CINNCORE_TARGET} cutlass)
260266
endif()
261267
endfunction()
262268

cmake/external/eigen.cmake

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,22 @@ endif()
5656

5757
set(EIGEN_INCLUDE_DIR ${SOURCE_DIR})
5858
include_directories(${EIGEN_INCLUDE_DIR})
59-
59+
if(NOT WIN32)
60+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
61+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=maybe-uninitialized")
62+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=maybe-uninitialized")
63+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
64+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=uninitialized")
65+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=uninitialized")
66+
endif()
67+
endif()
6068
ExternalProject_Add(
6169
extern_eigen3
6270
${EXTERNAL_PROJECT_LOG_ARGS}
6371
SOURCE_DIR ${SOURCE_DIR}
6472
PREFIX ${EIGEN_PREFIX_DIR}
65-
CMAKE_ARGS -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" -Wno-maybe-uninitialized"
66-
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}" -Wno-maybe-uninitialized"
73+
CMAKE_ARGS -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
74+
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
6775
UPDATE_COMMAND ""
6876
PATCH_COMMAND ${EIGEN_PATCH_COMMAND}
6977
CONFIGURE_COMMAND ""

0 commit comments

Comments
 (0)