Skip to content

Commit 908f4e4

Browse files
committed
Merge branch 'develop' into group_norm_opt
2 parents d358a6d + 23aa7a3 commit 908f4e4

File tree

715 files changed

+18934
-7828
lines changed

Some content is hidden

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

715 files changed

+18934
-7828
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ if(WITH_BRPC_RDMA)
330330
endif()
331331
endif()
332332

333+
333334
if(WITH_GPU)
334335
include(cuda)
335336
# lite subgraph compilation depends on CUDNN_ROOT,

cmake/external/llvm.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ endfunction()
9999

100100
function(mlir_add_rewriter td_base)
101101
set(LLVM_TARGET_DEFINITIONS ${td_base}.td)
102-
mlir_tablegen(${td_base}.hpp.inc -gen-rewriters "-I${CMAKE_SOURCE_DIR}/infrt/dialect/pass")
102+
mlir_tablegen(${td_base}.cpp.inc -gen-rewriters "-I${CMAKE_SOURCE_DIR}/infrt/dialect/pass")
103103
add_public_tablegen_target(${td_base}_IncGen)
104104
add_custom_target(${td_base}_inc DEPENDS ${td_base}_IncGen)
105105
endfunction()

cmake/generic.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,19 @@ function(find_fluid_modules TARGET_NAME)
116116
endif()
117117
endfunction(find_fluid_modules)
118118

119-
set_property(GLOBAL PROPERTY PTEN_MODULES "")
120-
# find all pten modules is used for paddle static library
119+
set_property(GLOBAL PROPERTY PHI_MODULES "")
120+
# find all phi modules is used for paddle static library
121121
# for building inference libs
122-
function(find_pten_modules TARGET_NAME)
122+
function(find_phi_modules TARGET_NAME)
123123
get_filename_component(__target_path ${TARGET_NAME} ABSOLUTE)
124124
string(REGEX REPLACE "^${PADDLE_SOURCE_DIR}/" "" __target_path ${__target_path})
125125
string(FIND "${__target_path}" "phi" pos)
126126
if(pos GREATER 1)
127-
get_property(pten_modules GLOBAL PROPERTY PTEN_MODULES)
128-
set(pten_modules ${pten_modules} ${TARGET_NAME})
129-
set_property(GLOBAL PROPERTY PTEN_MODULES "${pten_modules}")
127+
get_property(phi_modules GLOBAL PROPERTY PHI_MODULES)
128+
set(phi_modules ${phi_modules} ${TARGET_NAME})
129+
set_property(GLOBAL PROPERTY PHI_MODULES "${phi_modules}")
130130
endif()
131-
endfunction(find_pten_modules)
131+
endfunction(find_phi_modules)
132132

133133
function(common_link TARGET_NAME)
134134
if (WITH_PROFILER)
@@ -324,7 +324,7 @@ function(cc_library TARGET_NAME)
324324
else()
325325
add_library(${TARGET_NAME} STATIC ${cc_library_SRCS})
326326
find_fluid_modules(${TARGET_NAME})
327-
find_pten_modules(${TARGET_NAME})
327+
find_phi_modules(${TARGET_NAME})
328328
endif()
329329
if(cc_library_DEPS)
330330
# Don't need link libwarpctc.so
@@ -497,7 +497,7 @@ function(nv_library TARGET_NAME)
497497
else()
498498
add_library(${TARGET_NAME} STATIC ${nv_library_SRCS})
499499
find_fluid_modules(${TARGET_NAME})
500-
find_pten_modules(${TARGET_NAME})
500+
find_phi_modules(${TARGET_NAME})
501501
endif()
502502
if (nv_library_DEPS)
503503
add_dependencies(${TARGET_NAME} ${nv_library_DEPS})
@@ -588,7 +588,7 @@ function(hip_library TARGET_NAME)
588588
else()
589589
hip_add_library(${TARGET_NAME} STATIC ${hip_library_SRCS})
590590
find_fluid_modules(${TARGET_NAME})
591-
find_pten_modules(${TARGET_NAME})
591+
find_phi_modules(${TARGET_NAME})
592592
endif()
593593
if (hip_library_DEPS)
594594
add_dependencies(${TARGET_NAME} ${hip_library_DEPS})

cmake/inference_lib.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ copy(inference_lib_dist
224224
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/crypto/)
225225
include_directories(${CMAKE_BINARY_DIR}/../paddle/fluid/framework/io)
226226

227-
# copy api headers for pten & custom op
227+
# copy api headers for phi & custom op
228228
copy(inference_lib_dist
229229
SRCS ${PADDLE_SOURCE_DIR}/paddle/phi/api/ext/*.h
230230
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api/ext/)
@@ -244,11 +244,11 @@ copy(inference_lib_dist
244244
SRCS ${PADDLE_SOURCE_DIR}/paddle/extension.h
245245
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/)
246246

247-
# the header file of pten is copied to the experimental directory,
248-
# the include path of pten needs to be changed to adapt to inference api path
247+
# the header file of phi is copied to the experimental directory,
248+
# the include path of phi needs to be changed to adapt to inference api path
249249
add_custom_command(TARGET inference_lib_dist POST_BUILD
250-
COMMAND ${CMAKE_COMMAND} -P "${PADDLE_SOURCE_DIR}/cmake/pten_header.cmake"
251-
COMMENT "Change pten header include path to adapt to inference api path")
250+
COMMAND ${CMAKE_COMMAND} -P "${PADDLE_SOURCE_DIR}/cmake/phi_header.cmake"
251+
COMMENT "Change phi header include path to adapt to inference api path")
252252

253253
# CAPI inference library for only inference
254254
set(PADDLE_INFERENCE_C_INSTALL_DIR "${CMAKE_BINARY_DIR}/paddle_inference_c_install_dir" CACHE STRING

cmake/operators.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ function(op_library TARGET)
7373
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.cu)
7474
list(APPEND cu_srcs ${TARGET}.cu)
7575
endif()
76+
# rename in KP: .kps -> .cu
77+
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.kps)
78+
file(COPY ${TARGET}.kps DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
79+
file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.kps ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.cu)
80+
list(APPEND cu_srcs ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.cu)
81+
endif()
7682
if (WITH_NV_JETSON)
7783
list(REMOVE_ITEM cu_srcs "decode_jpeg_op.cu")
7884
endif()
@@ -96,6 +102,12 @@ function(op_library TARGET)
96102
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.cu)
97103
list(APPEND hip_srcs ${TARGET}.cu)
98104
endif()
105+
# rename in KP: .kps -> .cu
106+
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.kps)
107+
file(COPY ${TARGET}.kps DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
108+
file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.kps ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.cu)
109+
list(APPEND hip_srcs ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.cu)
110+
endif()
99111
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.part.cu)
100112
set(PART_CUDA_KERNEL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.part.cu
101113
${PART_CUDA_KERNEL_FILES} PARENT_SCOPE)

cmake/pten.cmake renamed to cmake/phi.cmake

Lines changed: 62 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,28 @@ function(generate_unify_header DIR_NAME)
5151
endforeach()
5252
# append header into extension.h
5353
string(REPLACE "${PADDLE_SOURCE_DIR}\/" "" header_file "${header_file}")
54-
file(APPEND ${pten_extension_header_file} "#include \"${header_file}\"\n")
54+
file(APPEND ${phi_extension_header_file} "#include \"${header_file}\"\n")
5555
endfunction()
5656

5757
# call kernel_declare need to make sure whether the target of input exists
5858
function(kernel_declare TARGET_LIST)
5959
foreach(kernel_path ${TARGET_LIST})
6060
file(READ ${kernel_path} kernel_impl)
61-
# TODO(chenweihang): rename PD_REGISTER_KERNEL to PD_REGISTER_KERNEL
62-
# NOTE(chenweihang): now we don't recommend to use digit in kernel name
63-
string(REGEX MATCH "(PD_REGISTER_KERNEL|PD_REGISTER_GENERAL_KERNEL)\\([ \t\r\n]*[a-z0-9_]*," first_registry "${kernel_impl}")
61+
string(REGEX MATCH "(PD_REGISTER_KERNEL|PD_REGISTER_GENERAL_KERNEL)\\([ \t\r\n]*[a-z0-9_]*,[ \t\r\n\/]*[a-z0-9_]*" first_registry "${kernel_impl}")
6462
if (NOT first_registry STREQUAL "")
63+
# some gpu kernel only can run on cuda, not support rocm, so we add this branch
64+
if (WITH_ROCM)
65+
string(FIND "${first_registry}" "cuda_only" pos)
66+
if(pos GREATER 1)
67+
continue()
68+
endif()
69+
endif()
6570
# parse the first kernel name
6671
string(REPLACE "PD_REGISTER_KERNEL(" "" kernel_name "${first_registry}")
6772
string(REPLACE "PD_REGISTER_GENERAL_KERNEL(" "" kernel_name "${kernel_name}")
6873
string(REPLACE "," "" kernel_name "${kernel_name}")
6974
string(REGEX REPLACE "[ \t\r\n]+" "" kernel_name "${kernel_name}")
75+
string(REGEX REPLACE "//cuda_only" "" kernel_name "${kernel_name}")
7076
# append kernel declare into declarations.h
7177
# TODO(chenweihang): default declare ALL_LAYOUT for each kernel
7278
if (${kernel_path} MATCHES "./cpu\/")
@@ -75,6 +81,8 @@ function(kernel_declare TARGET_LIST)
7581
file(APPEND ${kernel_declare_file} "PD_DECLARE_KERNEL(${kernel_name}, GPU, ALL_LAYOUT);\n")
7682
elseif (${kernel_path} MATCHES "./xpu\/")
7783
file(APPEND ${kernel_declare_file} "PD_DECLARE_KERNEL(${kernel_name}, XPU, ALL_LAYOUT);\n")
84+
elseif (${kernel_path} MATCHES "./gpudnn\/")
85+
file(APPEND ${kernel_declare_file} "PD_DECLARE_KERNEL(${kernel_name}, GPUDNN, ALL_LAYOUT);\n")
7886
else ()
7987
# deal with device independent kernel, now we use CPU temporaary
8088
file(APPEND ${kernel_declare_file} "PD_DECLARE_KERNEL(${kernel_name}, CPU, ALL_LAYOUT);\n")
@@ -88,13 +96,16 @@ function(kernel_library TARGET)
8896
set(cpu_srcs)
8997
set(gpu_srcs)
9098
set(xpu_srcs)
99+
set(gpudnn_srcs)
91100
set(selected_rows_srcs)
92101
# parse and save the deps kerenl targets
93102
set(all_srcs)
94103
set(kernel_deps)
95104

96105
set(oneValueArgs SUB_DIR)
97106
set(multiValueArgs SRCS DEPS)
107+
set(target_build_flag 1)
108+
98109
cmake_parse_arguments(kernel_library "${options}" "${oneValueArgs}"
99110
"${multiValueArgs}" ${ARGN})
100111

@@ -117,6 +128,9 @@ function(kernel_library TARGET)
117128
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gpu/${TARGET}.cu.cc)
118129
list(APPEND gpu_srcs ${CMAKE_CURRENT_SOURCE_DIR}/gpu/${TARGET}.cu.cc)
119130
endif()
131+
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gpudnn/${TARGET}_gpudnn.cu)
132+
list(APPEND gpudnn_srcs ${CMAKE_CURRENT_SOURCE_DIR}/gpudnn/${TARGET}_gpudnn.cu)
133+
endif()
120134
endif()
121135
if (WITH_XPU)
122136
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/xpu/${TARGET}.cc)
@@ -135,6 +149,7 @@ function(kernel_library TARGET)
135149
list(APPEND all_srcs ${cpu_srcs})
136150
list(APPEND all_srcs ${gpu_srcs})
137151
list(APPEND all_srcs ${xpu_srcs})
152+
list(APPEND all_srcs ${gpudnn_srcs})
138153
foreach(src ${all_srcs})
139154
file(READ ${src} target_content)
140155
string(REGEX MATCHALL "#include \"paddle\/phi\/kernels\/[a-z0-9_]+_kernel.h\"" include_kernels ${target_content})
@@ -160,21 +175,22 @@ function(kernel_library TARGET)
160175
list(LENGTH cpu_srcs cpu_srcs_len)
161176
list(LENGTH gpu_srcs gpu_srcs_len)
162177
list(LENGTH xpu_srcs xpu_srcs_len)
178+
list(LENGTH gpudnn_srcs gpudnn_srcs_len)
163179
list(LENGTH selected_rows_srcs selected_rows_srcs_len)
164180

165181
# Build Target according different src organization
166182
if((${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0 OR
167-
${xpu_srcs_len} GREATER 0) AND (${common_srcs_len} GREATER 0 OR
168-
${selected_rows_srcs_len} GREATER 0))
183+
${xpu_srcs_len} GREATER 0 OR ${gpudnn_srcs_len} GREATER 0) AND
184+
(${common_srcs_len} GREATER 0 OR ${selected_rows_srcs_len} GREATER 0))
169185
# If the common_srcs/selected_rows_srcs depends on specific device srcs, build target using this rule.
170186
if (WITH_GPU)
171-
if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0)
172-
nv_library(${TARGET}_part SRCS ${cpu_srcs} ${gpu_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
187+
if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0 OR ${gpudnn_srcs_len} GREATER 0)
188+
nv_library(${TARGET}_part SRCS ${cpu_srcs} ${gpu_srcs} ${gpudnn_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
173189
nv_library(${TARGET} SRCS ${common_srcs} ${selected_rows_srcs} DEPS ${TARGET}_part)
174190
endif()
175191
elseif (WITH_ROCM)
176-
if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0)
177-
hip_library(${TARGET}_part SRCS ${cpu_srcs} ${gpu_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
192+
if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0 OR ${gpudnn_srcs_len} GREATER 0)
193+
hip_library(${TARGET}_part SRCS ${cpu_srcs} ${gpu_srcs} ${gpudnn_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
178194
hip_library(${TARGET} SRCS ${common_srcs} ${selected_rows_srcs} DEPS ${TARGET}_part)
179195
endif()
180196
else()
@@ -184,14 +200,14 @@ function(kernel_library TARGET)
184200
endif()
185201
endif()
186202
# If there are only specific device srcs, build target using this rule.
187-
elseif (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0 OR ${xpu_srcs_len} GREATER 0)
203+
elseif (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0 OR ${xpu_srcs_len} GREATER 0 OR ${gpudnn_srcs_len} GREATER 0)
188204
if (WITH_GPU)
189-
if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0)
190-
nv_library(${TARGET} SRCS ${cpu_srcs} ${gpu_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
205+
if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0 OR ${gpudnn_srcs_len} GREATER 0)
206+
nv_library(${TARGET} SRCS ${cpu_srcs} ${gpu_srcs} ${gpudnn_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
191207
endif()
192208
elseif (WITH_ROCM)
193-
if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0)
194-
hip_library(${TARGET} SRCS ${cpu_srcs} ${gpu_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
209+
if (${cpu_srcs_len} GREATER 0 OR ${gpu_srcs_len} GREATER 0 OR ${gpudnn_srcs_len} GREATER 0)
210+
hip_library(${TARGET} SRCS ${cpu_srcs} ${gpu_srcs} ${gpudnn_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
195211
endif()
196212
else()
197213
if (${cpu_srcs_len} GREATER 0 OR ${xpu_srcs_len} GREATER 0)
@@ -228,35 +244,40 @@ function(kernel_library TARGET)
228244
cc_library(${TARGET} SRCS ${selected_rows_srcs} DEPS ${kernel_library_DEPS} ${kernel_deps})
229245
endif()
230246
else()
231-
message(FATAL_ERROR "Cannot find any implementation for ${TARGET}")
247+
set(target_build_flag 0)
232248
endif()
233249

234-
if (${common_srcs_len} GREATER 0 OR ${cpu_srcs_len} GREATER 0 OR
235-
${gpu_srcs_len} GREATER 0 OR ${xpu_srcs_len} GREATER 0 OR
236-
${selected_rows_srcs_len} GREATER 0)
237-
# append target into PTEN_KERNELS property
238-
get_property(pten_kernels GLOBAL PROPERTY PTEN_KERNELS)
239-
set(pten_kernels ${pten_kernels} ${TARGET})
240-
set_property(GLOBAL PROPERTY PTEN_KERNELS ${pten_kernels})
241-
endif()
250+
if (${target_build_flag} EQUAL 1)
251+
if (${common_srcs_len} GREATER 0 OR ${cpu_srcs_len} GREATER 0 OR
252+
${gpu_srcs_len} GREATER 0 OR ${xpu_srcs_len} GREATER 0 OR
253+
${gpudnn_srcs_len} GREATER 0 OR ${selected_rows_srcs_len} GREATER 0)
254+
# append target into PHI_KERNELS property
255+
get_property(phi_kernels GLOBAL PROPERTY PHI_KERNELS)
256+
set(phi_kernels ${phi_kernels} ${TARGET})
257+
set_property(GLOBAL PROPERTY PHI_KERNELS ${phi_kernels})
258+
endif()
242259

243-
# parse kernel name and auto generate kernel declaration
244-
# here, we don't need to check WITH_XXX, because if not WITH_XXX, the
245-
# xxx_srcs_len will be equal to 0
246-
if (${common_srcs_len} GREATER 0)
247-
kernel_declare(${common_srcs})
248-
endif()
249-
if (${cpu_srcs_len} GREATER 0)
250-
kernel_declare(${cpu_srcs})
251-
endif()
252-
if (${gpu_srcs_len} GREATER 0)
253-
kernel_declare(${gpu_srcs})
254-
endif()
255-
if (${xpu_srcs_len} GREATER 0)
256-
kernel_declare(${xpu_srcs})
257-
endif()
258-
if (${selected_rows_srcs_len} GREATER 0)
259-
kernel_declare(${selected_rows_srcs})
260+
# parse kernel name and auto generate kernel declaration
261+
# here, we don't need to check WITH_XXX, because if not WITH_XXX, the
262+
# xxx_srcs_len will be equal to 0
263+
if (${common_srcs_len} GREATER 0)
264+
kernel_declare(${common_srcs})
265+
endif()
266+
if (${cpu_srcs_len} GREATER 0)
267+
kernel_declare(${cpu_srcs})
268+
endif()
269+
if (${gpu_srcs_len} GREATER 0)
270+
kernel_declare(${gpu_srcs})
271+
endif()
272+
if (${xpu_srcs_len} GREATER 0)
273+
kernel_declare(${xpu_srcs})
274+
endif()
275+
if (${gpudnn_srcs_len} GREATER 0)
276+
kernel_declare(${gpudnn_srcs})
277+
endif()
278+
if (${selected_rows_srcs_len} GREATER 0)
279+
kernel_declare(${selected_rows_srcs})
280+
endif()
260281
endif()
261282
endfunction()
262283

cmake/pten_header.cmake renamed to cmake/phi_header.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
set(PADDLE_INFERENCE_INSTALL_DIR "${CMAKE_BINARY_DIR}/paddle_inference_install_dir")
1616

17-
function(pten_header_path_compat TARGET_PATH)
18-
message(STATUS "pten header path compat processing: ${TARGET_PATH}")
17+
function(phi_header_path_compat TARGET_PATH)
18+
message(STATUS "phi header path compat processing: ${TARGET_PATH}")
1919
string(FIND ${TARGET_PATH} "experimental" pos)
2020
if (pos GREATER 1)
2121
file(GLOB HEADERS "${TARGET_PATH}/*" "*.h")
@@ -25,17 +25,17 @@ if (pos GREATER 1)
2525
string(REPLACE "paddle/phi/" "paddle/include/experimental/phi/" HEADER_CONTENT "${HEADER_CONTENT}")
2626
string(REPLACE "paddle/utils/" "paddle/include/experimental/utils/" HEADER_CONTENT "${HEADER_CONTENT}")
2727
file(WRITE ${header} "${HEADER_CONTENT}")
28-
message(STATUS "pten header path compat processing complete: ${header}")
28+
message(STATUS "phi header path compat processing complete: ${header}")
2929
endif()
3030
endforeach()
3131
endif()
3232
endfunction()
3333

34-
pten_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental)
35-
pten_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api)
36-
pten_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api/ext)
37-
pten_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api/include)
38-
pten_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/common)
34+
phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental)
35+
phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api)
36+
phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api/ext)
37+
phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/api/include)
38+
phi_header_path_compat(${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/phi/common)
3939

4040
# In order to be compatible with the original behavior, the header file name needs to be changed
4141
file(RENAME ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/extension.h

paddle/fluid/distributed/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
add_subdirectory(collective)
12
add_subdirectory(store)
2-
33
if(NOT WITH_PSCORE)
44
add_subdirectory(fleet_executor)
55
return()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cc_library(processgroup SRCS ProcessGroup.cc DEPS phi phi_api eager_api)
2+
3+
if(WITH_NCCL)
4+
cc_library(processgroup_nccl SRCS ProcessGroupNCCL.cc DEPS place cuda_stream enforce collective_helper device_context phi phi_api eager_api)
5+
endif()

0 commit comments

Comments
 (0)