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
… nested-namespace-part-10
  • Loading branch information
walkalone20 committed Jun 24, 2024
2 parents d58d113 + e26bf13 commit 15f2ef8
Show file tree
Hide file tree
Showing 912 changed files with 26,569 additions and 65,940 deletions.
14 changes: 6 additions & 8 deletions cmake/cinn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,13 @@ cinn_cc_library(
DEPS
glog
${llvm_libs}
cinn_framework_proto
param_proto
auto_schedule_proto
schedule_desc_proto
tile_config_proto
absl
isl
ginac
pybind
op_fusion
cinn_op_dialect
${jitify_deps})
Expand All @@ -173,7 +171,12 @@ add_dependencies(cinnapi GEN_LLVM_RUNTIME_IR_HEADER ${core_deps})
target_link_libraries(cinnapi op_dialect pir phi)
add_dependencies(cinnapi op_dialect pir phi)

target_link_libraries(cinnapi ${PYTHON_LIBRARIES})
add_dependencies(cinnapi python)
if(LINUX)
target_link_libraries(cinnapi "-Wl,--unresolved-symbols=ignore-all")
elseif(APPLE)
target_link_libraries(cinnapi "-Wl,-undefined,dynamic_lookup")
endif()

if(WITH_MKL)
target_link_libraries(cinnapi cinn_mklml)
Expand Down Expand Up @@ -217,7 +220,6 @@ function(gen_cinncore LINKTYPE)
DEPS
glog
${llvm_libs}
cinn_framework_proto
param_proto
auto_schedule_proto
schedule_desc_proto
Expand Down Expand Up @@ -314,10 +316,6 @@ if(PUBLISH_LIBS)
${CMAKE_BINARY_DIR}/dist/build_demo.sh
COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/libcinncore_static.a
${CMAKE_BINARY_DIR}/dist/cinn/lib/libcinncore_static.a
COMMAND
cmake -E copy
${CMAKE_BINARY_DIR}/paddle/cinn/frontend/paddle/libcinn_framework_proto.a
${CMAKE_BINARY_DIR}/dist/cinn/lib/libcinn_framework_proto.a
COMMAND
cmake -E copy ${CMAKE_BINARY_DIR}/paddle/cinn/hlir/pe/libparam_proto.a
${CMAKE_BINARY_DIR}/dist/cinn/lib/libparam_proto.a
Expand Down
3 changes: 0 additions & 3 deletions cmake/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ endif()
if(WITH_CUSTOM_DEVICE AND NOT WIN32)
add_definitions(-DPADDLE_WITH_CUSTOM_DEVICE)
endif()
if(WITH_GPU_GRAPH)
add_definitions(-DPADDLE_WITH_GPU_GRAPH)
endif()

if(WITH_CUDNN_FRONTEND)
add_definitions(-DPADDLE_WITH_CUDNN_FRONTEND)
Expand Down
24 changes: 15 additions & 9 deletions cmake/external/xpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if(NOT DEFINED XPU_XRE_BASE_VERSION)
set(XPU_XRE_BASE_VERSION "4.32.0.1")
endif()
if(NOT DEFINED XPU_XHPC_BASE_DATE)
set(XPU_XHPC_BASE_DATE "20240515")
set(XPU_XHPC_BASE_DATE "20240601")
endif()
set(XPU_XCCL_BASE_VERSION "1.2.1.2")
if(NOT DEFINED XPU_XFT_BASE_VERSION)
Expand Down Expand Up @@ -58,7 +58,6 @@ set(XPU_XPTI_BASE_URL

if(WITH_XPU_XRE5)
set(XPU_XRE_BASE_VERSION "5.0.3.1")
set(XPU_XHPC_BASE_DATE "20240601")
set(XPU_XRE_BASE_URL
"https://klx-sdk-release-public.su.bcebos.com/xre/kl3-release/${XPU_XRE_BASE_VERSION}"
)
Expand All @@ -79,12 +78,11 @@ elseif(WITH_SUNWAY)
set(XPU_XCCL_DIR_NAME "") # TODO: xccl has no deepin output at now.
set(XPU_XFT_DIR_NAME "") # TODO: xft has no deepin output at now.
elseif(WITH_BDCENTOS)
set(XPU_XHPC_DIR_NAME "xhpc-bdcentos7_x86_64")
if(WITH_XPU_XRE5)
set(XPU_XRE_DIR_NAME "xre-bdcentos-x86_64-${XPU_XRE_BASE_VERSION}")
set(XPU_XHPC_DIR_NAME "xhpc-bdcentos7_x86_64")
else()
set(XPU_XRE_DIR_NAME "xre-bdcentos_x86_64")
set(XPU_XHPC_DIR_NAME "xhpc-bdcentos_x86_64")
endif()
set(XPU_XCCL_DIR_NAME "${XPU_XCCL_PREFIX}-bdcentos_x86_64")
set(XPU_XFT_DIR_NAME "xft_bdcentos6u3_x86_64_gcc82")
Expand All @@ -99,7 +97,7 @@ else()
set(XPU_XHPC_DIR_NAME "xhpc-ubuntu2004_x86_64")
else()
set(XPU_XRE_DIR_NAME "xre-ubuntu_1604_x86_64")
set(XPU_XHPC_DIR_NAME "xhpc-ubuntu_x86_64")
set(XPU_XHPC_DIR_NAME "xhpc-ubuntu1604_x86_64")
endif()
set(XPU_XCCL_DIR_NAME "${XPU_XCCL_PREFIX}-ubuntu_x86_64")
set(XPU_XFT_DIR_NAME "xft_ubuntu1604_x86_64")
Expand Down Expand Up @@ -206,8 +204,11 @@ include_directories(${XPU_XHPC_INC_DIR})
set(XPU_XBLAS_INC_DIR "${XPU_INC_DIR}/xhpc/xblas")
include_directories(${XPU_XBLAS_INC_DIR})

set(XPU_XFA_INC_DIR "${XPU_INC_DIR}/xhpc/xfa")
include_directories(${XPU_XFA_INC_DIR})
if(WITH_XPU_XRE5)
add_definitions(-DPADDLE_WITH_XPU_XRE5)
set(XPU_XFA_INC_DIR "${XPU_INC_DIR}/xhpc/xfa")
include_directories(${XPU_XFA_INC_DIR})
endif()

if(WITH_XPTI)
message(STATUS "Compile with XPU XPTI!")
Expand All @@ -225,8 +226,13 @@ if(WITH_XPTI)
target_link_libraries(xpulib ${XPU_XPTI_LIB})
endif()

target_link_libraries(xpulib ${XPU_RT_LIB} ${XPU_BKCL_LIB} ${XPU_XBLAS_LIB}
${XPU_API_LIB} ${XPU_XFA_LIB})
if(WITH_XPU_XRE5)
target_link_libraries(xpulib ${XPU_RT_LIB} ${XPU_BKCL_LIB} ${XPU_XBLAS_LIB}
${XPU_API_LIB} ${XPU_XFA_LIB})
else()
target_link_libraries(xpulib ${XPU_RT_LIB} ${XPU_BKCL_LIB} ${XPU_XBLAS_LIB}
${XPU_API_LIB})
endif()

add_dependencies(xpulib ${XPU_PROJECT})

Expand Down
7 changes: 7 additions & 0 deletions cmake/flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ if(WITH_ROCM)
string(REPLACE "-Werror" "-Wno-error" HIP_HIPCC_FLAGS ${HIP_HIPCC_FLAGS})
string(REPLACE "-Werror" "-Wno-error" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "-Werror" "-Wno-error" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
# disable warnings
string(APPEND HIP_HIPCC_FLAGS " -Wno-cuda-compat")
string(APPEND HIP_HIPCC_FLAGS " -Wno-self-assign")
string(APPEND HIP_HIPCC_FLAGS " -Wno-dev ")
string(APPEND CMAKE_CXX_FLAGS " -Wno-unused-result")
string(APPEND CMAKE_CXX_FLAGS " -Wno-unused-variable")
string(APPEND CMAKE_CXX_FLAGS " -Wno-strict-aliasing")
endif()

if(WITH_PSCORE
Expand Down
2 changes: 1 addition & 1 deletion cmake/generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ function(paddle_test_build TARGET_NAME)
add_dependencies(${TARGET_NAME} onednn)
endif()
if(WITH_SHARED_PHI)
target_link_libraries(${TARGET_NAME} $<TARGET_LINKER_FILE:phi>)
target_link_libraries(${TARGET_NAME} phi)
add_dependencies(${TARGET_NAME} phi)
endif()
if(WITH_SHARED_IR)
Expand Down
5 changes: 4 additions & 1 deletion cmake/hip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ list(APPEND HIP_CXX_FLAGS -Wno-deprecated-copy-with-user-provided-copy)
list(APPEND HIP_CXX_FLAGS -Wno-unused-local-typedef)
list(APPEND HIP_CXX_FLAGS -Wno-missing-braces)
list(APPEND HIP_CXX_FLAGS -Wno-sometimes-uninitialized)

list(APPEND HIP_CXX_FLAGS -Wno-deprecated-copy)
list(APPEND HIP_CXX_FLAGS -Wno-pessimizing-move)
list(APPEND HIP_CXX_FLAGS -std=c++17)
list(APPEND HIP_CXX_FLAGS --gpu-max-threads-per-block=1024)

Expand All @@ -152,9 +153,11 @@ set(HIP_CLANG_FLAGS ${HIP_CXX_FLAGS})
list(APPEND HIP_HCC_FLAGS -fno-gpu-rdc)
list(APPEND HIP_HCC_FLAGS --offload-arch=gfx906) # Z100 (ZIFANG)
list(APPEND HIP_HCC_FLAGS --offload-arch=gfx926) # K100 (KONGING)
list(APPEND HIP_HCC_FLAGS --offload-arch=gfx928) # K100_AI (KONGING_AI)
list(APPEND HIP_CLANG_FLAGS -fno-gpu-rdc)
list(APPEND HIP_CLANG_FLAGS --offload-arch=gfx906) # Z100 (ZIFANG)
list(APPEND HIP_CLANG_FLAGS --offload-arch=gfx926) # K100 (KONGING)
list(APPEND HIP_CLANG_FLAGS --offload-arch=gfx928) # K100_AI (KONGING_AI)

if(HIP_COMPILER STREQUAL clang)
set(hip_library_name amdhip64)
Expand Down
6 changes: 3 additions & 3 deletions cmake/inference_lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ else()
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include
${PADDLE_INFERENCE_INSTALL_DIR}/paddle/lib)
if(WITH_SHARED_PHI)
set(paddle_phi_lib ${PADDLE_BINARY_DIR}/paddle/phi/libphi.*)
set(paddle_phi_libs ${PADDLE_BINARY_DIR}/paddle/phi/libphi*)
copy(
inference_lib_dist
SRCS ${paddle_phi_lib}
SRCS ${paddle_phi_libs}
DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/lib)
if(WITH_GPU OR WITH_ROCM)
set(paddle_phi_kernel_gpu_lib
${PADDLE_BINARY_DIR}/paddle/phi/libphi_kernel_gpu.*)
${PADDLE_BINARY_DIR}/paddle/phi/libphi_gpu.*)
copy(
inference_lib_dist
SRCS ${paddle_phi_kernel_gpu_lib}
Expand Down
2 changes: 0 additions & 2 deletions paddle/cinn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ if(WITH_TESTING)
endif()

add_subdirectory(adt)
add_subdirectory(api)
add_subdirectory(ast_gen_ius)
add_subdirectory(auto_schedule)
add_subdirectory(common)
Expand All @@ -16,7 +15,6 @@ add_subdirectory(lang)
add_subdirectory(optim)
add_subdirectory(hlir)
add_subdirectory(pybind)
add_subdirectory(frontend)
add_subdirectory(operator_fusion)

# Download a model
Expand Down
1 change: 0 additions & 1 deletion paddle/cinn/adt/partition_op_stmts.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "paddle/cinn/adt/equation_graph.h"
#include "paddle/cinn/adt/map_expr.h"
#include "paddle/cinn/adt/naive_op_equation_context.h"
#include "paddle/cinn/hlir/framework/graph.h"

namespace cinn::adt {

Expand Down
3 changes: 0 additions & 3 deletions paddle/cinn/api/CMakeLists.txt

This file was deleted.

44 changes: 0 additions & 44 deletions paddle/cinn/api/README.md

This file was deleted.

Loading

0 comments on commit 15f2ef8

Please sign in to comment.