Skip to content

Commit

Permalink
7.15
Browse files Browse the repository at this point in the history
  • Loading branch information
ApricityXX committed Jul 15, 2024
2 parents 185c3be + 8b808f1 commit a7ff758
Show file tree
Hide file tree
Showing 6,109 changed files with 254,246 additions and 334,000 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 4 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# The basic usage is,
# clang-format -i -style=file PATH/TO/SOURCE/CODE
#
# The -style=file implicit use ".clang-format" file located in one of
# parent directory.
# The -style=file implicit use ".clang-format" file located in one of
# parent directory.
# The -i means inplace change.
#
# The document of clang-format is
# The document of clang-format is
# http://clang.llvm.org/docs/ClangFormat.html
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
Expand All @@ -20,7 +20,7 @@ IndentWidth: 2
TabWidth: 2
ContinuationIndentWidth: 4
AccessModifierOffset: -1 # The private/protected/public has no indent in class
Standard: Cpp11
Standard: Cpp11
AllowAllParametersOfDeclarationOnNextLine: true
BinPackParameters: false
BinPackArguments: false
Expand Down
4 changes: 2 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bugprone-copy-constructor-init,
-bugprone-dangling-handle,
-bugprone-dynamic-static-initializers,
bugprone-exception-escape,
-bugprone-fold-init-type,
bugprone-fold-init-type,
-bugprone-forwarding-reference-overload,
bugprone-inaccurate-erase,
bugprone-incorrect-roundings,
Expand Down Expand Up @@ -70,7 +70,7 @@ clang-analyzer-core.uninitialized.Assign,
clang-analyzer-cplusplus.InnerPointer,
-clang-analyzer-cplusplus.Move,
-clang-analyzer-cplusplus.NewDelete,
-clang-analyzer-cplusplus.NewDeleteLeaks,
clang-analyzer-cplusplus.NewDeleteLeaks,
-clang-analyzer-cplusplus.PureVirtualCall,
-clang-analyzer-cplusplus.SelfAssignment,
-clang-analyzer-cplusplus.SmartPtr,
Expand Down
75 changes: 75 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,76 @@
# This file is migrated from CI script, it's an effort of modenizing our dev infra.
# Code owners are expected to take responsibility for review patches to respective file.

/CMakeLists.txt @wanghuancoder @Aurelius84 @XiaoguangHu01 @qili93
paddle/fluid/distributed/collective @sneaxiy @ForFishes
paddle/fluid/eager/autograd_meta.cc @JiabinYang @phlrain
paddle/fluid/eager/autograd_meta.h @JiabinYang @phlrain
paddle/fluid/eager/backward.cc @JiabinYang @phlrain
paddle/fluid/eager/backward.h @JiabinYang @phlrain
paddle/fluid/eager/grad_node_info.cc @JiabinYang @phlrain
paddle/fluid/eager/grad_node_info.h @JiabinYang @phlrain
paddle/fluid/eager/grad_tensor_holder.cc @JiabinYang @phlrain
paddle/fluid/eager/grad_tensor_holder.h @JiabinYang @phlrain
paddle/fluid/eager/tensor_wrapper.h @JiabinYang @phlrain
paddle/fluid/framework/block_desc.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/details/op_registry.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/framework.proto @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/grad_op_desc_maker.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/ir/graph.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/ir/node.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/lod_tensor.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/op_desc.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/operator.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/scope.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/selected_rows.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/tensor.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/framework/unused_var_check.cc @zhiqiu @phlrain
paddle/fluid/framework/var_desc.h @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
paddle/fluid/operators/distributed/send_recv.proto.in @gongweibao @seiriosPlus
paddle/fluid/prim/api/api.yaml @cxxly @xiaoguoguo626807 @Charles-hit @cyber-pioneer @JiabinYang
paddle/fluid/prim/api/composite_backward/composite_backward_api.h @cxxly @xiaoguoguo626807 @Charles-hit @cyber-pioneer @JiabinYang
paddle/fluid/prim/api/composite_backward/composite_double_backward_api.h @cxxly @xiaoguoguo626807 @Charles-hit @cyber-pioneer @JiabinYang
paddle/fluid/prim/api/manual_prim/prim_manual_api.h @cxxly @xiaoguoguo626807 @Charles-hit @cyber-pioneer @JiabinYang
paddle/phi/api/include/tensor.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/attribute.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/dense_tensor.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/device_context.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/infermeta_utils.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/kernel_context.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/kernel_factory.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/kernel_registry.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/kernel_utils.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/meta_tensor.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/tensor_base.h @phlrain @zyfncg @YuanRisheng
paddle/phi/core/tensor_meta.h @phlrain @zyfncg @YuanRisheng
paddle/phi/infermeta/spmd_rules @LiYuRio @ForFishes @zhiqiu
paddle/scripts/paddle_build.bat @zhwesky2010 @wanghuancoder @Aurelius84
paddle/scripts/paddle_build.sh @risemeup1 @zhangbo9674 @XieYunshen
pyproject.toml @SigureMo @gouzil
python/paddle/autograd/backward_utils.py @Aurelius84 @cxxly @xiaoguoguo626807 @changeyoung98 @cyber-pioneer
python/paddle/autograd/ir_backward.py @Aurelius84 @cxxly @xiaoguoguo626807 @changeyoung98
python/paddle/base/backward.py @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
python/paddle/base/compiler.py @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
python/paddle/base/dygraph/layers.py @JiabinYang @phlrain
python/paddle/base/framework.py @XiaoguangHu01 @zhiqiu @Xreki @qili93 @Aurelius84
python/paddle/base/__init__.py @phlrain @Aurelius84 @qili93
python/paddle/base/tests/unittests/white_list/check_op_sequence_batch_1_input_white_list.py @Aurelius84 @phlrain
python/paddle/base/tests/unittests/white_list/check_op_sequence_instance_0_input_white_list.py @Aurelius84 @phlrain
python/paddle/base/tests/unittests/white_list/check_shape_white_list.py @hong19860320 @Aurelius84 @phlrain
python/paddle/base/tests/unittests/white_list/compile_vs_runtime_white_list.py @Aurelius84 @phlrain
python/paddle/base/tests/unittests/white_list/no_check_set_white_list.py @Aurelius84 @phlrain
python/paddle/base/tests/unittests/white_list/no_grad_set_white_list.py @Aurelius84 @phlrain
python/paddle/base/tests/unittests/white_list/op_accuracy_white_list.py @juncaipeng @zhangting2020 @Aurelius84
python/paddle/base/tests/unittests/white_list/op_threshold_white_list.py @juncaipeng @zhangting2020 @Aurelius84
python/paddle/distributed/fleet/__init__.py @sneaxiy @raindrops2sea
python/paddle/distributed/fleet/launch.py @sneaxiy @raindrops2sea
python/paddle/distributed/__init__.py @sneaxiy @raindrops2sea
python/paddle/incubate/autograd/composite_rules.py @cyber-pioneer @xiaoguoguo626807 @Charles-hit @JiabinYang
python/paddle/incubate/autograd/primitives.py @cyber-pioneer @xiaoguoguo626807 @Charles-hit @JiabinYang
python/paddle/_typing @SigureMo @zrr1999 @gouzil
python/requirements.txt @phlrain @jzhang533 @kolinwei
test/dygraph_to_static @SigureMo @Aurelius84 @gouzil
test/sot @SigureMo @Aurelius84 @gouzil
tools/parallel_UT_rule.py @zhwesky2010 @wanghuancoder @Aurelius84
tools/windows/run_unittests.sh @zhwesky2010 @wanghuancoder @Aurelius84
.pre-commit-config.yaml @SigureMo @gouzil
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ paddle/fluid/operators/generated_sparse_op.cc
paddle/fluid/operators/generated_static_op.cc
paddle/fluid/operators/generated_fused_op.cc
paddle/fluid/operators/ops_signature/generated_*.cc
paddle/phi/api/yaml/parsed_apis/
paddle/fluid/operators/generator/parsed_ops/
paddle/fluid/pybind/tmp_eager_op_function_impl.h
paddle/fluid/pybind/eager_op_function_impl.h
paddle/fluid/pybind/eager_op_function_impl.h
Expand All @@ -107,3 +105,8 @@ paddle/phi/kernels/fusion/cutlass/cutlass_kernels/fpA_intB_gemm/autogen/*
paddle/phi/kernels/fusion/cutlass/cutlass_kernels/fpA_intB_gemm/autogen_tmp/*
paddle/fluid/pybind/static_op_function.*
paddle/fluid/pybind/ops_api.cc
python/paddle/tensor/tensor.pyi
paddle/phi/kernels/fusion/cutlass/conv2d/build
paddle/phi/kernels/fusion/cutlass/conv2d/cutlass
paddle/phi/kernels/fusion/cutlass/gemm_epilogue/build
paddle/phi/kernels/fusion/cutlass/gemm_epilogue/cutlass
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,6 @@
path = third_party/nlohmann_json
url = https://github.com/nlohmann/json.git
ignore = dirty
[submodule "third_party/yaml-cpp"]
path = third_party/yaml-cpp
url = https://github.com/jbeder/yaml-cpp
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ repos:
- id: sort-simple-yaml
files: (ops|backward|op_[a-z_]+)\.yaml$
- id: trailing-whitespace
files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake|yaml|yml|hook)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists\.txt)$
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
rev: v1.5.1
hooks:
Expand All @@ -44,7 +43,7 @@ repos:
name: copyright_checker
entry: python ./tools/codestyle/copyright.py
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|xpu|kps|py|sh)$
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|xpu|kps|py|pyi|sh)$
exclude: |
(?x)^(
paddle/utils/.*|
Expand All @@ -55,9 +54,8 @@ repos:
rev: 23.3.0
hooks:
- id: black
files: (.*\.(py|pyi|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.5.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --no-cache]
Expand Down
24 changes: 13 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ option(WITH_XPU "Compile PaddlePaddle with BAIDU KUNLUN XPU" OFF)
option(WITH_XPU_KP "Compile PaddlePaddle with BAIDU XPU compiler " OFF)
option(WITH_XPU_XFT "Compile PaddlePaddle with BAIDU XPU-XFT" OFF)
option(WITH_XPU_PLUGIN "Compile PaddlePaddle with BAIDU XPU plugin" OFF)
option(WITH_XPU_XHPC "Compile PaddlePaddle with BAIDU XPU-HPC library"
${WITH_XPU})
option(WITH_XPU_XRE5 "Compile PaddlePaddle with BAIDU XPU XRE 5" OFF)
option(WITH_WIN_DUMP_DBG "Compile with windows core dump debug mode" OFF)
option(WITH_ROCM "Compile PaddlePaddle with ROCM platform" OFF)
option(WITH_IPU "Compile PaddlePaddle with Graphcore IPU" OFF)
Expand Down Expand Up @@ -91,14 +90,17 @@ endif()
if(WITH_GPU AND WITH_XPU_XFT)
message(FATAL_ERROR "Error when compile GPU and XPU-XFT at the same time")
endif()
if(WITH_GPU AND WITH_XPU_XHPC)
message(FATAL_ERROR "Error when compile GPU and XPU-HPC at the same time")
if(WITH_GPU AND WITH_XPU_XRE5)
message(FATAL_ERROR "Error when compile GPU and XPU-XRE5 at the same time")
endif()
if(WITH_GPU AND WITH_ROCM)
message(FATAL_ERROR "Error when compile CUDA and ROCM at the same time")
endif()

if(WITH_GPU AND NOT APPLE)
if(WITH_PIP_CUDA_LIBRARIES AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_definitions(-DPADDLE_WITH_PIP_CUDA_LIBRARIES)
endif()
#(Note risemeup1): The cudart dynamic library libcudart.so is used by set CUDA_USE_STATIC_CUDA_RUNTIME and CMAKE_CUDA_FLAGS
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL
"x86_64")
Expand All @@ -107,8 +109,8 @@ if(WITH_GPU AND NOT APPLE)
CACHE BOOL "" FORCE)
set(CMAKE_CUDA_FLAGS "--cudart shared")
if(WITH_PIP_CUDA_LIBRARIES)
#(Note risemeup1): Flag 'WITH_PIP_CUDA_LIBRARIES' will be used in dynamic_loader.cc to search for CUDA-related .so files through the Python libraries provided by NVIDIA.
add_definitions(-DWITH_PIP_CUDA_LIBRARIES)
#(Note risemeup1): Flag 'PADDLE_WITH_PIP_CUDA_LIBRARIES' will be used in dynamic_loader.cc to search for CUDA-related .so files through the Python libraries provided by NVIDIA.
add_definitions(-DPADDLE_WITH_PIP_CUDA_LIBRARIES)
endif()
endif()
enable_language(CUDA)
Expand Down Expand Up @@ -465,12 +467,12 @@ if(NOT WITH_XPU AND WITH_XPU_BKCL)
CACHE STRING "Disable BKCL when compiling without XPU" FORCE)
endif()

if(NOT WITH_XPU AND WITH_XPU_XHPC)
message(
WARNING "Disable XHPC when compiling without XPU. Force WITH_XPU_XHPC=OFF.")
set(WITH_XPU_XHPC
if(NOT WITH_XPU AND WITH_XPU_XRE5)
message((WARNING
"Disable XRE5 when compiling without XPU. Force WITH_XPU_XRE5=OFF"))
set(WITH_XPU_XRE5
OFF
CACHE STRING "Disable XHPC when compiling without XPU" FORCE)
CACHE STRING "Disable XRE5 when compiling without XPU" FORCE)
endif()

if(WITH_NCCL)
Expand Down
2 changes: 1 addition & 1 deletion cmake/PaddleConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
get_filename_component(PADDLE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}/../.." ABSOLUTE)

# include directories
set(PADDLE_INCLUDE_DIRS
set(PADDLE_INCLUDE_DIRS
${PADDLE_INSTALL_PREFIX}/include
${PADDLE_INSTALL_PREFIX}/include/third_party
)
Expand Down
22 changes: 21 additions & 1 deletion cmake/cblas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
# Find the CBlas and lapack libraries
#
# It will search MKLML, OpenBlas, reference-cblas, extern-openblas in order.
# On APPLE, accelerate framework (apple's blas implementation) will be
# used, if applicable.
#
# If any cblas implementation found, the following variable will be set.
# CBLAS_PROVIDER # one of MKLML, OPENBLAS, REFERENCE
# CBLAS_PROVIDER # one of MKLML, ACCELERATE, OPENBLAS, REFERENCE
# CBLAS_INC_DIR # the include directory for cblas.
# CBLAS_LIBS # a list of libraries should be linked by paddle.
# # Each library should be full path to object file.
Expand Down Expand Up @@ -45,6 +47,24 @@ if(WITH_MKLML)
"(include: ${CBLAS_INC_DIR}, library: ${CBLAS_LIBRARIES})")
endif()

## find accelerate on apple
if(APPLE AND NOT DEFINED CBLAS_PROVIDER)
find_library(ACCELERATE_FRAMEWORK Accelerate)
if(ACCELERATE_FRAMEWORK)
message(STATUS "Accelerate framework found " "${ACCELERATE_FRAMEWORK}")

set(CBLAS_PROVIDER ACCELERATE)
# no need to setup include dir if it's accelerate
# set(CBLAS_INC_DIR "")
set(CBLAS_LIBRARIES ${ACCELERATE_FRAMEWORK})

add_definitions(-DPADDLE_USE_ACCELERATE)
add_definitions(-DLAPACK_FOUND)
else()
message(WARNING "Accelerate framework not found")
endif()
endif()

## Then find openblas.
if(NOT DEFINED CBLAS_PROVIDER)
set(OPENBLAS_ROOT
Expand Down
26 changes: 14 additions & 12 deletions cmake/ccache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@ if(NOT WIN32)
endif()
elseif("${CMAKE_GENERATOR}" STREQUAL "Ninja")
# (Note:zhouwei25) Only Ninja Generator can support sccache now
find_program(SCCACHE_PATH sccache)
if(WITH_SCCACHE)
find_program(SCCACHE_PATH sccache)

if(SCCACHE_PATH)
execute_process(COMMAND sccache -V OUTPUT_VARIABLE sccache_version)
message(
STATUS
"sccache is founded, use [${SCCACHE_PATH}] to speed up compile on Windows."
)
if(SCCACHE_PATH)
execute_process(COMMAND sccache -V OUTPUT_VARIABLE sccache_version)
message(
STATUS
"sccache is founded, use [${SCCACHE_PATH}] to speed up compile on Windows."
)

set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE_PATH})
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE_PATH})
# (Note:zhouwei25) sccache for cuda compiler has bug so that it can't be hit
# refer to https://github.com/mozilla/sccache/issues/1017, so we fix it
set(CMAKE_CUDA_COMPILER_LAUNCHER ${SCCACHE_PATH})
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE_PATH})
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE_PATH})
# (Note:zhouwei25) sccache for cuda compiler has bug so that it can't be hit
# refer to https://github.com/mozilla/sccache/issues/1017, so we fix it
set(CMAKE_CUDA_COMPILER_LAUNCHER ${SCCACHE_PATH})
endif()
endif()
endif()
24 changes: 8 additions & 16 deletions cmake/cinn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ if(WITH_GPU)
/usr/lib /usr/lib64 REQUIRED)
endif()

if(WITH_ROCM)
message(STATUS "CINN Compile with ROCM support")
add_definitions(-DCINN_WITH_HIP)
endif()

set(cinnapi_src CACHE INTERNAL "" FORCE)
set(core_src CACHE INTERNAL "" FORCE)
set(core_includes CACHE INTERNAL "" FORCE)
Expand Down Expand Up @@ -156,14 +161,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 @@ -172,8 +176,7 @@ 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(WITH_MKL)
target_link_libraries(cinnapi cinn_mklml)
add_dependencies(cinnapi cinn_mklml)
Expand Down Expand Up @@ -216,10 +219,10 @@ function(gen_cinncore LINKTYPE)
DEPS
glog
${llvm_libs}
cinn_framework_proto
param_proto
auto_schedule_proto
schedule_desc_proto
tile_config_proto
absl
isl
ginac
Expand Down Expand Up @@ -303,19 +306,8 @@ if(PUBLISH_LIBS)
add_custom_command(
TARGET cinncore_static
POST_BUILD
COMMAND
cmake -E copy ${PROJECT_SOURCE_DIR}/tools/cinn/tutorials_demo/demo.cc
${CMAKE_BINARY_DIR}/dist/demo.cc
COMMAND
cmake -E copy
${PROJECT_SOURCE_DIR}/tools/cinn/tutorials_demo/build_demo.sh
${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
5 changes: 4 additions & 1 deletion cmake/cinn/core.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ function(cinn_cc_library TARGET_NAME)
endif()

if(cinn_cc_library_DEPS)
# Don't need link libwarpctc.so
if("${cinn_cc_library_DEPS};" MATCHES "python;")
list(REMOVE_ITEM cinn_cc_library_DEPS python)
add_dependencies(${TARGET_NAME} python)
endif()
target_link_libraries(${TARGET_NAME} ${cinn_cc_library_DEPS})
add_dependencies(${TARGET_NAME} ${cinn_cc_library_DEPS})
endif()
Expand Down
Loading

0 comments on commit a7ff758

Please sign in to comment.