Skip to content

Commit 3bd19d5

Browse files
committed
Merge develop
2 parents c5e2bbd + b565b34 commit 3bd19d5

File tree

382 files changed

+16652
-7200
lines changed

Some content is hidden

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

382 files changed

+16652
-7200
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ paddle/fluid/op_use_default_grad_maker_DEV.spec
77
paddle/fluid/op_use_default_grad_maker_PR.spec
88
paddle/phi/api/backward/backward_api.h
99
paddle/phi/api/include/api.h
10+
paddle/phi/api/include/sparse_api.h
1011
paddle/phi/api/lib/api.cc
1112
paddle/phi/api/lib/dygraph_api.*
1213
paddle/phi/api/lib/backward_api.cc
14+
paddle/phi/api/lib/sparse_api.cc
1315
paddle/phi/extension.h
1416
paddle/phi/include/*
1517
paddle/phi/infermeta/generated.*
@@ -49,6 +51,9 @@ tools/__pycache__
4951
# This file is automatically generated.
5052
# TODO(zhiqiang) Move this file to build directory.
5153
paddle/infrt/dialect/pd_ops.td
54+
paddle/infrt/dialect/phi/ir/phi_cpu_kernels.td
55+
paddle/infrt/dialect/phi/ir/phi_gpu_kernels.td
56+
tools/infrt/kernels.json
5257
paddle/infrt/dialect/pd_ops_info.h
5358
.lit_test_times.txt
5459
paddle/infrt/tests/dialect/Output

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ option(WITH_MIPS "Compile PaddlePaddle with mips support" OFF)
238238
option(WITH_MUSL "Compile with musl libc instead of gblic" OFF)
239239
option(WITH_UNITY_BUILD "Compile with UnityBuild mode" OFF)
240240
option(WITH_STRIP "Strip so files of Whl packages" OFF)
241-
option(NEW_RELEASE_CUBIN "PaddlePaddle next-level release strategy for pypi cubin package" OFF)
241+
option(NEW_RELEASE_PYPI "PaddlePaddle next-level release strategy for pypi cubin package" OFF)
242+
option(NEW_RELEASE_ALL "PaddlePaddle next-level release strategy for all arches cubin package" OFF)
242243
option(NEW_RELEASE_JIT "PaddlePaddle next-level release strategy for backup jit package" OFF)
243244
option(WITH_ASCEND_INT64 "Compile with int64 kernel for ascend NPU" OFF)
244245
option(WITH_POCKETFFT "Compile with pocketfft support" ON)

cmake/cuda.cmake

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,22 @@ if(WITH_NV_JETSON)
66
add_definitions(-DWITH_NV_JETSON)
77
set(paddle_known_gpu_archs "53 62 72")
88
set(paddle_known_gpu_archs10 "53 62 72")
9-
elseif(NEW_RELEASE_CUBIN)
9+
elseif(NEW_RELEASE_ALL)
10+
message("Using New Release Strategy - All Arches Packge")
11+
add_definitions(-DNEW_RELEASE_ALL)
12+
set(paddle_known_gpu_archs "35 50 52 60 61 70 75 80 86")
13+
set(paddle_known_gpu_archs10 "35 50 52 60 61 70 75")
14+
set(paddle_known_gpu_archs11 "35 50 52 60 61 70 75 80")
15+
elseif(NEW_RELEASE_PYPI)
1016
message("Using New Release Strategy - Cubin Packge")
11-
add_definitions(-DNEW_RELEASE_CUBIN)
12-
set(paddle_known_gpu_archs "35 37 50 52 60 61 70 75 80 86")
13-
set(paddle_known_gpu_archs10 "50 60 70 75")
14-
set(paddle_known_gpu_archs11 "60 70 75 80")
17+
add_definitions(-DNEW_RELEASE_PYPI)
18+
set(paddle_known_gpu_archs "35 50 52 60 61 70 75 80 86")
19+
set(paddle_known_gpu_archs10 "")
20+
set(paddle_known_gpu_archs11 "60 61 70 75 80")
1521
elseif(NEW_RELEASE_JIT)
1622
message("Using New Release Strategy - JIT Packge")
1723
add_definitions(-DNEW_RELEASE_JIT)
18-
set(paddle_known_gpu_archs "35 37 50 52 60 61 70 75 80 86")
24+
set(paddle_known_gpu_archs "35 50 52 60 61 70 75 80 86")
1925
set(paddle_known_gpu_archs10 "35 50 60 70 75")
2026
set(paddle_known_gpu_archs11 "35 50 60 70 75 80")
2127
else()
@@ -148,7 +154,7 @@ function(select_nvcc_arch_flags out_variable)
148154

149155
# remove dots and convert to lists
150156
string(REGEX REPLACE "\\." "" cuda_arch_bin "${cuda_arch_bin}")
151-
string(REGEX REPLACE "\\." "" cuda_arch_ptx "${CUDA_ARCH_PTX}")
157+
string(REGEX REPLACE "\\." "" cuda_arch_ptx "${cuda_arch_ptx}")
152158
string(REGEX MATCHALL "[0-9()]+" cuda_arch_bin "${cuda_arch_bin}")
153159
string(REGEX MATCHALL "[0-9]+" cuda_arch_ptx "${cuda_arch_ptx}")
154160

paddle/fluid/distributed/collective/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
cc_library(processgroup SRCS ProcessGroup.cc DEPS phi phi_api eager_api)
2+
if (WITH_DISTRIBUTE)
3+
cc_library(processgroup_gloo SRCS ProcessGroupGloo.cc DEPS phi phi_api eager_api gloo_wrapper)
4+
endif()
25
cc_library(eager_reducer SRCS reducer.cc DEPS eager_api processgroup)
36

47
if(WITH_NCCL)

paddle/fluid/distributed/collective/ProcessGroup.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,35 @@ class ProcessGroup {
117117
"ProcessGroup%s does not support receive", GetBackendName()));
118118
}
119119

120+
virtual std::shared_ptr<ProcessGroup::Task> AllGather(
121+
std::vector<Tensor>& in_tensors /* tensors */, // NOLINT
122+
std::vector<Tensor>& out_tensors /* tensors */) { // NOLINT
123+
PADDLE_THROW(platform::errors::InvalidArgument(
124+
"ProcessGroup%s does not support AllGather", GetBackendName()));
125+
}
126+
127+
virtual std::shared_ptr<ProcessGroup::Task> AllToAll(
128+
std::vector<Tensor>& in /* tensors */, // NOLINT
129+
std::vector<Tensor>& out /* tensors */) { // NOLINT
130+
PADDLE_THROW(platform::errors::InvalidArgument(
131+
"ProcessGroup%s does not support AllToAll", GetBackendName()));
132+
}
133+
134+
virtual std::shared_ptr<ProcessGroup::Task> Reduce(
135+
std::vector<Tensor>& tensors /* tensors */, // NOLINT
136+
const ReduceOptions& opts) { // NOLINT
137+
PADDLE_THROW(platform::errors::InvalidArgument(
138+
"ProcessGroup%s does not support Reduce", GetBackendName()));
139+
}
140+
141+
virtual std::shared_ptr<ProcessGroup::Task> Scatter(
142+
std::vector<Tensor>& in_tensors /* tensors */, // NOLINT
143+
std::vector<Tensor>& out_tensors /* tensors */, // NOLINT
144+
const ScatterOptions&) { // NOLINT
145+
PADDLE_THROW(platform::errors::InvalidArgument(
146+
"ProcessGroup%s does not support Scatter", GetBackendName()));
147+
}
148+
120149
protected:
121150
const int rank_;
122151
const int size_;

0 commit comments

Comments
 (0)