Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/cinn/core.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function(cinn_merge_static_libs TARGET_NAME)
COMMAND ${CMAKE_COMMAND} -E touch ${target_SRCS}
DEPENDS ${libs})

# Generate dummy staic lib
# Generate dummy static lib
file(WRITE ${target_SRCS}
"const char *dummy_${TARGET_NAME} = \"${target_SRCS}\";")
add_library(${TARGET_NAME} STATIC ${target_SRCS})
Expand Down
2 changes: 1 addition & 1 deletion cmake/cinn/external/absl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ExternalProject_Add(
BUILD_BYPRODUCTS ${ABSL_INSTALL_DIR}/lib/libabsl_bad_variant_access.a
BUILD_BYPRODUCTS ${ABSL_INSTALL_DIR}/lib/libabsl_raw_hash_set.a)

# It may be more convinent if we just include all absl libs
# It may be more convenient if we just include all absl libs
set(ABSL_LIB_NAMES
hash
wyhash
Expand Down
2 changes: 1 addition & 1 deletion cmake/cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF)
# So, don't set these flags here.
set(CMAKE_CUDA_STANDARD 17)

# (Note) For windows, if delete /W[1-4], /W1 will be added defaultly and conflic with -w
# (Note) For windows, if delete /W[1-4], /W1 will be added defaultly and conflict with -w
# So replace /W[1-4] with /W0
if(WIN32)
string(REGEX REPLACE "/W[1-4]" " /W0 " CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/cub.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6)
set(CUB_TAG 1.16.0)
execute_process(COMMAND git --git-dir=${CUB_SOURCE_DIR}/.git
--work-tree=${CUB_SOURCE_DIR} checkout ${CUB_TAG})
# cub 1.16.0 is not compitable with current thrust version
# cub 1.16.0 is not compatible with current thrust version
add_definitions(-DTHRUST_IGNORE_CUB_VERSION_CHECK)
else()
set(CUB_TAG 1.8.0)
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/lapack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set(LAPACK_DOWNLOAD_DIR
set(LAPACK_INSTALL_DIR ${THIRD_PARTY_PATH}/install/lapack)
set(LAPACK_LIB_DIR ${LAPACK_INSTALL_DIR}/lib)

# Note(zhouwei): lapack need fortan compiler which many machines don't have, so use precompiled library.
# Note(zhouwei): lapack need fortran compiler which many machines don't have, so use precompiled library.
# use lapack tag v3.10.0 on 06/28/2021 https://github.com/Reference-LAPACK/lapack
if(LINUX)
set(LAPACK_FILE
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/mklml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if(WIN32)
else()
#TODO(intel-huying):
# Now enable csrmm function in mklml library temporarily,
# it will be updated as offical version later.
# it will be updated as official version later.
set(MKLML_FILE
"csrmm_mklml_lnx_2019.0.5.tgz"
CACHE STRING "" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/protobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ if(WITH_IPU)
elseif(WITH_ARM_BRPC)
set(PROTOBUF_VERSION 21.12-baidu-ee-common)
elseif(WIN32)
#Lower version prootbuf is used for widows
#Lower version protobuf is used for widows
set(PROTOBUF_VERSION 21.12)
else()
set(PROTOBUF_VERSION 21.12)
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if(NOT WIN32)
file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/pybind/cast.h.patch
native_dst)
# Note: [Why calling some `git` commands before `patch`?]
# Paddle's CI uses cache to accelarate the make process. However, error might raise when patch codes in two scenarios:
# Paddle's CI uses cache to accelerate the make process. However, error might raise when patch codes in two scenarios:
# 1. Patch to the wrong version: the tag version of CI's cache falls behind PYBIND_TAG, use `git checkout ${PYBIND_TAG}` to solve this.
# 2. Patch twice: the tag version of cache == PYBIND_TAG, but patch has already applied to cache.
set(PYBIND_PATCH_COMMAND
Expand Down
2 changes: 1 addition & 1 deletion cmake/flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function(CheckCompilerCXX14Flag)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID
STREQUAL "Clang")
# cmake >= 3.0 compiler id "AppleClang" on Mac OS X, otherwise "Clang"
# Apple Clang is a different compiler than upstream Clang which havs different version numbers.
# Apple Clang is a different compiler than upstream Clang which has different version numbers.
# https://gist.github.com/yamaya/2924292
if(APPLE) # cmake < 3.0 compiler id "Clang" on Mac OS X
if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5.1)
Expand Down
18 changes: 9 additions & 9 deletions cmake/generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#
# nv_library(example SRCS example.cu)
#
# To specify that a library new_example.a depends on other libraies:
# To specify that a library new_example.a depends on other libraries:
#
# cc_library(new_example SRCS new_example.cc DEPS example)
#
Expand Down Expand Up @@ -72,7 +72,7 @@
# nv_test(example_test SRCS example_test.cu DEPS example)
#
# It is pretty often that executable and test binaries depend on
# pre-defined external libaries like glog and gflags defined in
# pre-defined external libraries like glog and gflags defined in
# /cmake/external/*.cmake:
#
# cc_test(example_test SRCS example_test.cc DEPS example glog gflags)
Expand Down Expand Up @@ -257,7 +257,7 @@ function(merge_static_libs TARGET_NAME)
COMMAND ${CMAKE_COMMAND} -E touch ${target_SRCS}
DEPENDS ${libs})

# Generate dummy staic lib
# Generate dummy static lib
generate_dummy_static_lib(LIB_NAME ${TARGET_NAME} FILE_PATH ${target_SRCS}
GENERATOR "generic.cmake:merge_static_libs")
target_link_libraries(${TARGET_NAME} ${libs_deps})
Expand Down Expand Up @@ -310,7 +310,7 @@ function(merge_static_libs TARGET_NAME)
foreach(lib ${libs})
set(libfiles ${libfiles} $<TARGET_FILE:${lib}>)
endforeach()
# msvc compiler will put libarary in directory of "/Release/xxxlib" by default
# msvc compiler will put library in directory of "/Release/xxxlib" by default
add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
Expand Down Expand Up @@ -530,7 +530,7 @@ function(cc_test TARGET_NAME)
"${multiValueArgs}" ${ARGN})
if(WIN32)
# NOTE(zhiqiu): on windows platform, the symbols should be exported
# explicitly by __declspec(dllexport), however, there are serveral
# explicitly by __declspec(dllexport), however, there are several
# symbols not exported, and link error occurs.
# so, the tests are not built against dynamic libraries now.
cc_test_old(
Expand Down Expand Up @@ -577,7 +577,7 @@ function(cc_test_old TARGET_NAME)
cmake_parse_arguments(cc_test "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
cc_test_build(${TARGET_NAME} SRCS ${cc_test_SRCS} DEPS ${cc_test_DEPS})
# we dont test hcom op, because it need complex configuration
# we donot test hcom op, because it need complex configuration
# with more than one machine
cc_test_run(${TARGET_NAME} COMMAND ${TARGET_NAME} ARGS ${cc_test_ARGS})
elseif(WITH_TESTING AND NOT TEST ${TARGET_NAME})
Expand Down Expand Up @@ -809,7 +809,7 @@ function(hip_binary TARGET_NAME)
set(multiValueArgs SRCS DEPS)
cmake_parse_arguments(hip_binary "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
# FindHIP.cmake defined hip_add_executable, HIP_SOURCE_PROPERTY_FORMAT is requried for .cc files
# FindHIP.cmake defined hip_add_executable, HIP_SOURCE_PROPERTY_FORMAT is required for .cc files
hip_add_executable(${TARGET_NAME} ${hip_binary_SRCS})
if(hip_binary_DEPS)
target_link_libraries(${TARGET_NAME} ${hip_binary_DEPS})
Expand All @@ -826,7 +826,7 @@ function(hip_test TARGET_NAME)
cmake_parse_arguments(hip_test "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
# FindHIP.cmake defined hip_add_executable,
# HIP_SOURCE_PROPERTY_FORMAT is requried for .cc files
# HIP_SOURCE_PROPERTY_FORMAT is required for .cc files
hip_add_executable(${TARGET_NAME} ${hip_test_SRCS})
# "-pthread -ldl -lrt" is defined in CMAKE_CXX_LINK_EXECUTABLE
target_link_options(${TARGET_NAME} PRIVATE -pthread -ldl -lrt)
Expand Down Expand Up @@ -1231,7 +1231,7 @@ function(grpc_library TARGET_NAME)
get_filename_component(PROTO_WE ${grpc_library_PROTO} NAME_WE)
get_filename_component(PROTO_PATH ${ABS_PROTO} PATH)

# FIXME(putcn): the follwoing line is supposed to generate *.pb.h and cc, but
# FIXME(putcn): the following line is supposed to generate *.pb.h and cc, but
# somehow it didn't. line 602 to 604 is to patching this. Leaving this here
# for now to enable dist CI.
paddle_protobuf_generate_cpp(grpc_proto_srcs grpc_proto_hdrs "${ABS_PROTO}")
Expand Down
4 changes: 2 additions & 2 deletions cmake/init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ else()
set(CMAKE_CUDA_FLAGS_MINSIZEREL "-Xcompiler=\"-MD -O1 -Ob1\" -DNDEBUG")
endif()

# It can specify CUDA compile flag manualy,
# its use is to remvoe /Zi to reduce GPU static library size. But it's dangerous
# It can specify CUDA compile flag manually,
# its use is to remove /Zi to reduce GPU static library size. But it's dangerous
# because CUDA will update by nvidia, then error will occur.
# Now, it's only used in VS2015 + CUDA:[10.0, 10.2]
set(WIN_PROPS ${CMAKE_SOURCE_DIR}/cmake/paddle_win.props)
Expand Down
4 changes: 2 additions & 2 deletions cmake/phi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function(kernel_declare TARGET_LIST)
is_all_backend
"${first_registry}")
if(NOT is_all_backend STREQUAL "")
# parse the registerd kernel message
# parse the registered kernel message
string(
REPLACE "PD_REGISTER_KERNEL_FOR_ALL_BACKEND_DTYPE_EXCEPT_CUSTOM("
"" kernel_msg "${first_registry}")
Expand All @@ -131,7 +131,7 @@ function(kernel_declare TARGET_LIST)
is_all_backend
"${first_registry}")

# parse the registerd kernel message
# parse the registered kernel message
string(REPLACE "PD_REGISTER_KERNEL_FOR_ALL_BACKEND_DTYPE(" ""
kernel_msg "${first_registry}")
endif()
Expand Down
12 changes: 6 additions & 6 deletions cmake/third_party.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

include(ExternalProject)
# Creat a target named "third_party", which can compile external dependencies on all platform(windows/linux/mac)
# Create a target named "third_party", which can compile external dependencies on all platform(windows/linux/mac)

set(THIRD_PARTY_PATH
"${CMAKE_BINARY_DIR}/third_party"
Expand Down Expand Up @@ -55,16 +55,16 @@ if(NOT WITH_SETUP_INSTALL)
endif()

endif()
# cache funciton to avoid repeat download code of third_party.
# This function has 4 parameters, URL / REPOSITOR / TAG / DIR:
# cache function to avoid repeat download code of third_party.
# This function has 4 parameters, URL / REPOSITORY / TAG / DIR:
# 1. URL: specify download url of 3rd party
# 2. REPOSITORY: specify git REPOSITORY of 3rd party
# 3. TAG: specify git tag/branch/commitID of 3rd party
# 4. DIR: overwrite the original SOURCE_DIR when cache directory
#
# The function Return 1 PARENT_SCOPE variables:
# - ${TARGET}_DOWNLOAD_CMD: Simply place "${TARGET}_DOWNLOAD_CMD" in ExternalProject_Add,
# and you no longer need to set any donwnload steps in ExternalProject_Add.
# and you no longer need to set any download steps in ExternalProject_Add.
# For example:
# Cache_third_party(${TARGET}
# REPOSITORY ${TARGET_REPOSITORY}
Expand Down Expand Up @@ -145,10 +145,10 @@ macro(UNSET_VAR VAR_NAME)
unset(${VAR_NAME})
endmacro()

# Funciton to Download the dependencies during compilation
# Function to Download the dependencies during compilation
# This function has 2 parameters, URL / DIRNAME:
# 1. URL: The download url of 3rd dependencies
# 2. NAME: The name of file, that determin the dirname
# 2. NAME: The name of file, that determine the dirname
#
function(file_download_and_uncompress URL NAME)
set(options "")
Expand Down
4 changes: 2 additions & 2 deletions cmake/unity_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ endfunction()
# If the source file does not hit any registed groups, use itself.
# This function put the actual combination relationship in variables instead of
# writing the unity source file. The reason is that writing unity source file
# will change the timestampe and affect the effect of retaining the build
# will change the timestamp and affect the effect of retaining the build
# directory on Windows.
# Here you need to specify the source type which belongs to cc or cu.
function(compose_unity_target_sources TARGET TYPE)
Expand All @@ -84,7 +84,7 @@ function(compose_unity_target_sources TARGET TYPE)
PROPERTY ${TARGET}_${TYPE}_group_index)
foreach(src ${ARGN})
set(unity_file "")
# Note(zhouwei25): UB use the path releative to CMAKE_SOURCE_DIR.
# Note(zhouwei25): UB use the path relative to CMAKE_SOURCE_DIR.
# If use absolute path, sccache/ccache hit rate will be reduced.
if(IS_ABSOLUTE ${src})
set(src_absolute_path ${src})
Expand Down