summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJunjie Bai <jbai@fb.com>2019-03-16 09:03:17 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-03-16 09:06:42 -0700
commit0fe6e8c8703bc69b8795ba7373dcd5c51812a513 (patch)
tree70a621af84cf7463ab71acca7ad5a066b94471c0 /cmake
parentc7448aa13c94ab47429484f4d02356c1a2f789ed (diff)
downloadpytorch-0fe6e8c8703bc69b8795ba7373dcd5c51812a513.tar.gz
pytorch-0fe6e8c8703bc69b8795ba7373dcd5c51812a513.tar.bz2
pytorch-0fe6e8c8703bc69b8795ba7373dcd5c51812a513.zip
Remove ComputeLibrary submodule
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/18052 Reviewed By: ezyang Differential Revision: D14477355 fbshipit-source-id: c56b802f6d69701596c327cf9af6782f30e335fa
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Dependencies.cmake57
-rw-r--r--cmake/MiscCheck.cmake17
2 files changed, 0 insertions, 74 deletions
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 297eacb174..f1aa1d28c0 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -919,63 +919,6 @@ if(USE_PROF)
endif()
endif()
-# ---[ ARM Compute Library: check compatibility.
-if (USE_ACL)
- if (NOT ANDROID)
- message(WARNING "ARM Compute Library is only supported for Android builds.")
- caffe2_update_option(USE_ACL OFF)
- else()
- list(APPEND Caffe2_DEPENDENCY_LIBS EGL GLESv2)
- if (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv")
- # 32-bit ARM (armv7, armv7-a, armv7l, etc)
- set(ACL_ARCH "armv7a")
- elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)$")
- # 64-bit ARM
- set(ACL_ARCH "arm64-v8a")
- else()
- message(WARNING "ARM Compute Library is only supported for ARM/ARM64 builds.")
- caffe2_update_option(USE_ACL OFF)
- endif()
- endif()
-endif()
-
-# ---[ ARM Compute Library: build the target.
-if (USE_ACL)
- list(APPEND ARM_COMPUTE_INCLUDE_DIRS "third_party/ComputeLibrary/")
- list(APPEND ARM_COMPUTE_INCLUDE_DIRS "third_party/ComputeLibrary/include")
- include_directories(SYSTEM ${ARM_COMPUTE_INCLUDE_DIRS})
- string (REPLACE ";" " -I" ANDROID_STL_INCLUDE_FLAGS "-I${ANDROID_STL_INCLUDE_DIRS}")
- set (ARM_COMPUTE_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/../third_party/ComputeLibrary/")
- set (ARM_COMPUTE_LIB "${CMAKE_CURRENT_BINARY_DIR}/libarm_compute.a")
- set (ARM_COMPUTE_CORE_LIB "${CMAKE_CURRENT_BINARY_DIR}/libarm_compute_core.a")
- set (ARM_COMPUTE_LIBS ${ARM_COMPUTE_LIB} ${ARM_COMPUTE_CORE_LIB})
-
- add_custom_command(
- OUTPUT ${ARM_COMPUTE_LIBS}
- COMMAND
- /bin/sh -c "export PATH=\"$PATH:$(dirname ${CMAKE_CXX_COMPILER})\" && \
- scons -C \"${ARM_COMPUTE_SRC_DIR}\" -Q \
- examples=no validation_tests=no benchmark_tests=no standalone=yes \
- embed_kernels=yes opencl=no gles_compute=yes \
- os=android arch=${ACL_ARCH} \
- extra_cxx_flags=\"${ANDROID_CXX_FLAGS} ${ANDROID_STL_INCLUDE_FLAGS}\"" &&
- /bin/sh -c "cp ${ARM_COMPUTE_SRC_DIR}/build/libarm_compute-static.a ${CMAKE_CURRENT_BINARY_DIR}/libarm_compute.a" &&
- /bin/sh -c "cp ${ARM_COMPUTE_SRC_DIR}/build/libarm_compute_core-static.a ${CMAKE_CURRENT_BINARY_DIR}/libarm_compute_core.a" &&
- /bin/sh -c "rm -r ${ARM_COMPUTE_SRC_DIR}/build"
- COMMENT "Building ARM compute library" VERBATIM)
- add_custom_target(arm_compute_build ALL DEPENDS ${ARM_COMPUTE_LIBS})
-
- add_library(arm_compute_core STATIC IMPORTED)
- add_dependencies(arm_compute_core arm_compute_build)
- set_property(TARGET arm_compute_core PROPERTY IMPORTED_LOCATION ${ARM_COMPUTE_CORE_LIB})
-
- add_library(arm_compute STATIC IMPORTED)
- add_dependencies(arm_compute arm_compute_build)
- set_property(TARGET arm_compute PROPERTY IMPORTED_LOCATION ${ARM_COMPUTE_LIB})
-
- list(APPEND Caffe2_DEPENDENCY_LIBS arm_compute arm_compute_core)
-endif()
-
if (USE_SNPE AND ANDROID)
if (SNPE_LOCATION AND SNPE_HEADERS)
message(STATUS "Using SNPE location specified by -DSNPE_LOCATION: " ${SNPE_LOCATION})
diff --git a/cmake/MiscCheck.cmake b/cmake/MiscCheck.cmake
index 06ff17b59f..193e6df7fb 100644
--- a/cmake/MiscCheck.cmake
+++ b/cmake/MiscCheck.cmake
@@ -333,23 +333,6 @@ if (IOS)
add_definitions("-Wno-deprecated-declarations")
endif()
-# ---[ If we are building with ACL, we will enable neon-fp16.
-if(USE_ACL)
- if (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv")
- # 32-bit ARM (armv7, armv7-a, armv7l, etc)
- set(ACL_ARCH "armv7a")
- # Compilers for 32-bit ARM need extra flags to enable NEON-FP16
- add_definitions("-mfpu=neon-fp16")
-
- include(CheckCCompilerFlag)
- CHECK_C_COMPILER_FLAG(
- -mfp16-format=ieee CAFFE2_COMPILER_SUPPORTS_FP16_FORMAT)
- if (CAFFE2_COMPILER_SUPPORTS_FP16_FORMAT)
- add_definitions("-mfp16-format=ieee")
- endif()
- endif()
-endif()
-
# ---[ If we use asan, turn on the flags.
# TODO: This only works with new style gcc and clang (not the old -faddress-sanitizer).
# Change if necessary on old platforms.