mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
[BE] fix typos in cmake/ (#156079)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/156079 Approved by: https://github.com/Skylion007
This commit is contained in:
parent
5eb5c3700b
commit
ccea6ddac3
|
|
@ -1160,7 +1160,6 @@ exclude_patterns = [
|
||||||
# as necessary
|
# as necessary
|
||||||
'aten/**',
|
'aten/**',
|
||||||
'c10/**',
|
'c10/**',
|
||||||
'cmake/**',
|
|
||||||
'docs/**',
|
'docs/**',
|
||||||
'functorch/**',
|
'functorch/**',
|
||||||
'scripts/**',
|
'scripts/**',
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ endfunction()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# -- [ Deterine commit hash
|
# -- [ Determine commit hash
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND "${Python_EXECUTABLE}" -c "from tools.generate_torch_version import get_sha;print(get_sha('.'), end='')"
|
COMMAND "${Python_EXECUTABLE}" -c "from tools.generate_torch_version import get_sha;print(get_sha('.'), end='')"
|
||||||
OUTPUT_VARIABLE COMMIT_SHA
|
OUTPUT_VARIABLE COMMIT_SHA
|
||||||
|
|
@ -81,7 +81,7 @@ if(INTERN_BUILD_ATEN_OPS)
|
||||||
if(USE_CUDA)
|
if(USE_CUDA)
|
||||||
# The stable/nightly builds do not enable some SM architectures,
|
# The stable/nightly builds do not enable some SM architectures,
|
||||||
# like 89/90a/100a. Still, some files need to be built for these
|
# like 89/90a/100a. Still, some files need to be built for these
|
||||||
# architecturs specifically. This function makes it possible to
|
# architectures specifically. This function makes it possible to
|
||||||
# enable building given file for a specific such architecture, in
|
# enable building given file for a specific such architecture, in
|
||||||
# case if PyTorch is built for corresponding other architecture;
|
# case if PyTorch is built for corresponding other architecture;
|
||||||
# for example, it will enable building for SM 90a in case PyTorch
|
# for example, it will enable building for SM 90a in case PyTorch
|
||||||
|
|
@ -408,7 +408,7 @@ if(INTERN_BUILD_ATEN_OPS)
|
||||||
list(LENGTH CPU_CAPABILITY_NAMES NUM_CPU_CAPABILITY_NAMES)
|
list(LENGTH CPU_CAPABILITY_NAMES NUM_CPU_CAPABILITY_NAMES)
|
||||||
math(EXPR NUM_CPU_CAPABILITY_NAMES "${NUM_CPU_CAPABILITY_NAMES}-1")
|
math(EXPR NUM_CPU_CAPABILITY_NAMES "${NUM_CPU_CAPABILITY_NAMES}-1")
|
||||||
|
|
||||||
# The sources list might get reordered later based on the capabilites.
|
# The sources list might get reordered later based on the capabilities.
|
||||||
# See NOTE [ Linking AVX and non-AVX files ]
|
# See NOTE [ Linking AVX and non-AVX files ]
|
||||||
foreach(i RANGE ${NUM_CPU_CAPABILITY_NAMES})
|
foreach(i RANGE ${NUM_CPU_CAPABILITY_NAMES})
|
||||||
function(process_vec NAME)
|
function(process_vec NAME)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
function(print_target_properties tgt)
|
function(print_target_properties tgt)
|
||||||
# Get all propreties that cmake supports
|
# Get all properties that cmake supports
|
||||||
execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST)
|
execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST)
|
||||||
|
|
||||||
# Convert command output into a CMake list
|
# Convert command output into a CMake list
|
||||||
|
|
|
||||||
|
|
@ -1151,7 +1151,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
|
||||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
|
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe)
|
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe)
|
||||||
# Suppress warning to unblock libnop comiplation by clang-17
|
# Suppress warning to unblock libnop compilation by clang-17
|
||||||
# See https://github.com/pytorch/pytorch/issues/151316
|
# See https://github.com/pytorch/pytorch/issues/151316
|
||||||
target_compile_options_if_supported(tensorpipe -Wno-missing-template-arg-list-after-template-kw)
|
target_compile_options_if_supported(tensorpipe -Wno-missing-template-arg-list-after-template-kw)
|
||||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0")
|
if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0")
|
||||||
|
|
@ -1203,7 +1203,7 @@ if(USE_GLOO)
|
||||||
endif()
|
endif()
|
||||||
set(GLOO_USE_CUDA_TOOLKIT ON CACHE BOOL "" FORCE)
|
set(GLOO_USE_CUDA_TOOLKIT ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
# Disable NCCL/RCCL since we don't use Gloo+NCCL, make sure to reenable it!
|
# Disable NCCL/RCCL since we don't use Gloo+NCCL, make sure to re-enable it!
|
||||||
set(USE_NCCL_SAVED ${USE_NCCL})
|
set(USE_NCCL_SAVED ${USE_NCCL})
|
||||||
set(USE_RCCL_SAVED ${USE_RCCL})
|
set(USE_RCCL_SAVED ${USE_RCCL})
|
||||||
set(USE_NCCL OFF)
|
set(USE_NCCL OFF)
|
||||||
|
|
@ -1214,7 +1214,7 @@ if(USE_GLOO)
|
||||||
|
|
||||||
# Here is a little bit hacky. We have to put PROJECT_BINARY_DIR in front
|
# Here is a little bit hacky. We have to put PROJECT_BINARY_DIR in front
|
||||||
# of PROJECT_SOURCE_DIR with/without conda system. The reason is that
|
# of PROJECT_SOURCE_DIR with/without conda system. The reason is that
|
||||||
# gloo generates a new config.h in the binary diretory.
|
# gloo generates a new config.h in the binary directory.
|
||||||
include_directories(BEFORE SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/gloo)
|
include_directories(BEFORE SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/gloo)
|
||||||
include_directories(BEFORE SYSTEM ${PROJECT_BINARY_DIR}/third_party/gloo)
|
include_directories(BEFORE SYSTEM ${PROJECT_BINARY_DIR}/third_party/gloo)
|
||||||
else()
|
else()
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ if(NOT CORTEXA9_FOUND)
|
||||||
endif(NOT CORTEXA9_FOUND)
|
endif(NOT CORTEXA9_FOUND)
|
||||||
mark_as_advanced(NEON_FOUND)
|
mark_as_advanced(NEON_FOUND)
|
||||||
|
|
||||||
#SVE support is availale is only for Linux OS.
|
#SVE support is available is only for Linux OS.
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
# Include necessary modules for checking C and C++ source compilations
|
# Include necessary modules for checking C and C++ source compilations
|
||||||
INCLUDE(CheckCSourceCompiles)
|
INCLUDE(CheckCSourceCompiles)
|
||||||
|
|
|
||||||
|
|
@ -909,7 +909,7 @@ mark_as_advanced(CUDA_cupti_LIBRARY)
|
||||||
|
|
||||||
# Set the CUDA_LIBRARIES variable. This is the set of stuff to link against if you are
|
# Set the CUDA_LIBRARIES variable. This is the set of stuff to link against if you are
|
||||||
# using the CUDA runtime. For the dynamic version of the runtime, most of the
|
# using the CUDA runtime. For the dynamic version of the runtime, most of the
|
||||||
# dependencies are brough in, but for the static version there are additional libraries
|
# dependencies are brought in, but for the static version there are additional libraries
|
||||||
# and linker commands needed.
|
# and linker commands needed.
|
||||||
# Initialize to empty
|
# Initialize to empty
|
||||||
set(CUDA_LIBRARIES)
|
set(CUDA_LIBRARIES)
|
||||||
|
|
@ -1202,7 +1202,7 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path)
|
||||||
# Only deal with CMake style paths from here on out
|
# Only deal with CMake style paths from here on out
|
||||||
file(TO_CMAKE_PATH "${path}" bpath)
|
file(TO_CMAKE_PATH "${path}" bpath)
|
||||||
if (IS_ABSOLUTE "${bpath}")
|
if (IS_ABSOLUTE "${bpath}")
|
||||||
# Absolute paths are generally unnessary, especially if something like
|
# Absolute paths are generally unnecessary, especially if something like
|
||||||
# file(GLOB_RECURSE) is used to pick up the files.
|
# file(GLOB_RECURSE) is used to pick up the files.
|
||||||
|
|
||||||
string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos)
|
string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos)
|
||||||
|
|
@ -1225,7 +1225,7 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path)
|
||||||
# Avoid spaces
|
# Avoid spaces
|
||||||
string(REPLACE " " "_" bpath "${bpath}")
|
string(REPLACE " " "_" bpath "${bpath}")
|
||||||
|
|
||||||
# Strip off the filename. I wait until here to do it, since removin the
|
# Strip off the filename. I wait until here to do it, since removing the
|
||||||
# basename can make a path that looked like path/../basename turn into
|
# basename can make a path that looked like path/../basename turn into
|
||||||
# path/.. (notice the trailing slash).
|
# path/.. (notice the trailing slash).
|
||||||
get_filename_component(bpath "${bpath}" PATH)
|
get_filename_component(bpath "${bpath}" PATH)
|
||||||
|
|
@ -1725,7 +1725,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
|
||||||
list(APPEND flags -Xcompiler ${f})
|
list(APPEND flags -Xcompiler ${f})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Add our general CUDA_NVCC_FLAGS with the configuration specifig flags
|
# Add our general CUDA_NVCC_FLAGS with the configuration specific flags
|
||||||
set(nvcc_flags ${CUDA_NVCC_FLAGS} ${config_specific_flags} ${nvcc_flags})
|
set(nvcc_flags ${CUDA_NVCC_FLAGS} ${config_specific_flags} ${nvcc_flags})
|
||||||
|
|
||||||
file(RELATIVE_PATH output_file_relative_path "${CMAKE_BINARY_DIR}" "${output_file}")
|
file(RELATIVE_PATH output_file_relative_path "${CMAKE_BINARY_DIR}" "${output_file}")
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ macro(cuda_execute_process status command)
|
||||||
# copy and paste a runnable command line.
|
# copy and paste a runnable command line.
|
||||||
set(cuda_execute_process_string)
|
set(cuda_execute_process_string)
|
||||||
foreach(arg ${ARGN})
|
foreach(arg ${ARGN})
|
||||||
# If there are quotes, excape them, so they come through.
|
# If there are quotes, escape them, so they come through.
|
||||||
string(REPLACE "\"" "\\\"" arg ${arg})
|
string(REPLACE "\"" "\\\"" arg ${arg})
|
||||||
# Args with spaces need quotes around them to get them to be parsed as a single argument.
|
# Args with spaces need quotes around them to get them to be parsed as a single argument.
|
||||||
if(arg MATCHES " ")
|
if(arg MATCHES " ")
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ if(IOS_DEPLOYMENT_TARGET)
|
||||||
set(XCODE_IOS_PLATFORM_VERSION_FLAGS "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
|
set(XCODE_IOS_PLATFORM_VERSION_FLAGS "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Hidden visibilty is required for cxx on iOS
|
# Hidden visibility is required for cxx on iOS
|
||||||
set(CMAKE_C_FLAGS_INIT "${XCODE_IOS_PLATFORM_VERSION_FLAGS}")
|
set(CMAKE_C_FLAGS_INIT "${XCODE_IOS_PLATFORM_VERSION_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS_INIT "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -fvisibility-inlines-hidden")
|
set(CMAKE_CXX_FLAGS_INIT "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -fvisibility-inlines-hidden")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ set_property(
|
||||||
TARGET caffe2::nvrtc PROPERTY INTERFACE_LINK_LIBRARIES
|
TARGET caffe2::nvrtc PROPERTY INTERFACE_LINK_LIBRARIES
|
||||||
CUDA::nvrtc caffe2::cuda)
|
CUDA::nvrtc caffe2::cuda)
|
||||||
|
|
||||||
# Add onnx namepsace definition to nvcc
|
# Add onnx namespace definition to nvcc
|
||||||
if(ONNX_NAMESPACE)
|
if(ONNX_NAMESPACE)
|
||||||
list(APPEND CUDA_NVCC_FLAGS "-DONNX_NAMESPACE=${ONNX_NAMESPACE}")
|
list(APPEND CUDA_NVCC_FLAGS "-DONNX_NAMESPACE=${ONNX_NAMESPACE}")
|
||||||
else()
|
else()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user