mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[Submodule] Clear USE_QNNPACK build option (#126941)
Following the removal of QNNPACK third-party module #126657, we can clear more build system code. Also third_party/neon2sse was removed because it is not used. Pull Request resolved: https://github.com/pytorch/pytorch/pull/126941 Approved by: https://github.com/ezyang
This commit is contained in:
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -74,10 +74,6 @@
|
||||
ignore = dirty
|
||||
path = third_party/gemmlowp/gemmlowp
|
||||
url = https://github.com/google/gemmlowp.git
|
||||
[submodule "third_party/neon2sse"]
|
||||
ignore = dirty
|
||||
path = third_party/neon2sse
|
||||
url = https://github.com/intel/ARM_NEON_2_x86_SSE.git
|
||||
[submodule "third_party/fbgemm"]
|
||||
ignore = dirty
|
||||
path = third_party/fbgemm
|
||||
|
@ -260,7 +260,6 @@ option(USE_OPENMP "Use OpenMP for parallel code" ON)
|
||||
option(USE_PRECOMPILED_HEADERS "Use pre-compiled headers to accelerate build." OFF)
|
||||
|
||||
option(USE_PROF "Use profiling" OFF)
|
||||
option(USE_QNNPACK "Use QNNPACK (quantized 8-bit operators)" ON)
|
||||
option(USE_PYTORCH_QNNPACK "Use ATen/QNNPACK (quantized 8-bit operators)" ON)
|
||||
option(USE_SNPE "Use Qualcomm's SNPE library" OFF)
|
||||
option(USE_SYSTEM_EIGEN_INSTALL
|
||||
@ -631,7 +630,6 @@ if(INTERN_BUILD_MOBILE)
|
||||
set(USE_DISTRIBUTED OFF)
|
||||
set(NO_API ON)
|
||||
set(USE_FBGEMM OFF)
|
||||
set(USE_QNNPACK OFF)
|
||||
set(INTERN_DISABLE_ONNX ON)
|
||||
if(USE_BLAS)
|
||||
set(INTERN_USE_EIGEN_BLAS ON)
|
||||
@ -779,10 +777,6 @@ if(USE_FBGEMM)
|
||||
string(APPEND CMAKE_CXX_FLAGS " -DUSE_FBGEMM")
|
||||
endif()
|
||||
|
||||
if(USE_QNNPACK)
|
||||
string(APPEND CMAKE_CXX_FLAGS " -DUSE_QNNPACK")
|
||||
endif()
|
||||
|
||||
if(USE_PYTORCH_QNNPACK)
|
||||
string(APPEND CMAKE_CXX_FLAGS " -DUSE_PYTORCH_QNNPACK")
|
||||
endif()
|
||||
|
@ -309,7 +309,7 @@ endif()
|
||||
# mismatch between these shared dependencies, explicitly declare our intent to these
|
||||
# libraries that we are interested in using the exact same source dependencies for all.
|
||||
|
||||
if(USE_NNPACK OR USE_QNNPACK OR USE_PYTORCH_QNNPACK OR USE_XNNPACK)
|
||||
if(USE_NNPACK OR USE_PYTORCH_QNNPACK OR USE_XNNPACK)
|
||||
set(DISABLE_NNPACK_AND_FAMILY OFF)
|
||||
|
||||
# Sanity checks - Can we actually build NNPACK and family given the configuration provided?
|
||||
@ -350,14 +350,12 @@ if(USE_NNPACK OR USE_QNNPACK OR USE_PYTORCH_QNNPACK OR USE_XNNPACK)
|
||||
|
||||
if(DISABLE_NNPACK_AND_FAMILY)
|
||||
caffe2_update_option(USE_NNPACK OFF)
|
||||
caffe2_update_option(USE_QNNPACK OFF)
|
||||
caffe2_update_option(USE_PYTORCH_QNNPACK OFF)
|
||||
caffe2_update_option(USE_XNNPACK OFF)
|
||||
else()
|
||||
# Disable unsupported NNPack combinations with MSVC
|
||||
if(MSVC)
|
||||
caffe2_update_option(USE_NNPACK OFF)
|
||||
caffe2_update_option(USE_QNNPACK OFF)
|
||||
caffe2_update_option(USE_PYTORCH_QNNPACK OFF)
|
||||
endif()
|
||||
|
||||
@ -383,13 +381,6 @@ else()
|
||||
set(DISABLE_NNPACK_AND_FAMILY ON)
|
||||
endif()
|
||||
|
||||
if(USE_QNNPACK AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
message(WARNING
|
||||
"QNNPACK does not compile for Apple Silicon. "
|
||||
"Turn this warning off by explicit USE_QNNPACK=OFF.")
|
||||
caffe2_update_option(USE_QNNPACK OFF)
|
||||
endif()
|
||||
|
||||
set(CONFU_DEPENDENCIES_SOURCE_DIR ${PROJECT_BINARY_DIR}/confu-srcs
|
||||
CACHE PATH "Confu-style dependencies source directory")
|
||||
set(CONFU_DEPENDENCIES_BINARY_DIR ${PROJECT_BINARY_DIR}/confu-deps
|
||||
@ -479,14 +470,9 @@ if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(s390x|ppc64le)$")
|
||||
list(APPEND Caffe2_DEPENDENCY_LIBS cpuinfo)
|
||||
endif()
|
||||
|
||||
# ---[ Caffe2 Int8 operators (enabled by USE_QNNPACK) depend on gemmlowp and neon2sse headers
|
||||
if(USE_QNNPACK)
|
||||
set(CAFFE2_THIRD_PARTY_ROOT "${PROJECT_SOURCE_DIR}/third_party")
|
||||
include_directories(SYSTEM "${CAFFE2_THIRD_PARTY_ROOT}/gemmlowp")
|
||||
include_directories(SYSTEM "${CAFFE2_THIRD_PARTY_ROOT}/neon2sse")
|
||||
endif()
|
||||
|
||||
# ---[ PYTORCH_QNNPACK
|
||||
set(CAFFE2_THIRD_PARTY_ROOT "${PROJECT_SOURCE_DIR}/third_party")
|
||||
if(USE_PYTORCH_QNNPACK)
|
||||
if(NOT DEFINED PYTORCH_QNNPACK_SOURCE_DIR)
|
||||
set(PYTORCH_QNNPACK_SOURCE_DIR "${PROJECT_SOURCE_DIR}/aten/src/ATen/native/quantized/cpu/qnnpack" CACHE STRING "QNNPACK source directory")
|
||||
@ -507,6 +493,8 @@ if(USE_PYTORCH_QNNPACK)
|
||||
# them into a shared library for Caffe2, so they need PIC.
|
||||
set_property(TARGET pytorch_qnnpack PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET cpuinfo PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
# QNNPACK depends on gemmlowp headers
|
||||
target_include_directories(pytorch_qnnpack PRIVATE "${CAFFE2_THIRD_PARTY_ROOT}/gemmlowp")
|
||||
|
||||
if(PYTORCH_QNNPACK_CUSTOM_THREADPOOL)
|
||||
target_compile_definitions(
|
||||
|
@ -163,7 +163,6 @@ function(caffe2_print_configuration_summary)
|
||||
message(STATUS " USE_VULKAN_RELAXED_PRECISION : ${USE_VULKAN_RELAXED_PRECISION}")
|
||||
endif()
|
||||
message(STATUS " USE_PROF : ${USE_PROF}")
|
||||
message(STATUS " USE_QNNPACK : ${USE_QNNPACK}")
|
||||
message(STATUS " USE_PYTORCH_QNNPACK : ${USE_PYTORCH_QNNPACK}")
|
||||
message(STATUS " USE_XNNPACK : ${USE_XNNPACK}")
|
||||
message(STATUS " USE_DISTRIBUTED : ${USE_DISTRIBUTED}")
|
||||
|
@ -89,10 +89,6 @@ else()
|
||||
append_torchlib_if_found(pytorch_qnnpack)
|
||||
endif()
|
||||
|
||||
if(@USE_QNNPACK@)
|
||||
append_torchlib_if_found(qnnpack)
|
||||
endif()
|
||||
|
||||
if(@USE_XNNPACK@)
|
||||
append_torchlib_if_found(XNNPACK)
|
||||
endif()
|
||||
|
1
defs.bzl
1
defs.bzl
@ -35,7 +35,6 @@ default_compiler_flags = [
|
||||
"-DNO_CUDNN_DESTROY_HANDLE",
|
||||
"-DUSE_EXPERIMENTAL_CUDNN_V8_API", # enable cudnn v8 api
|
||||
"-DUSE_FBGEMM",
|
||||
"-DUSE_QNNPACK",
|
||||
"-DUSE_PYTORCH_QNNPACK",
|
||||
# The dynamically loaded NVRTC trick doesn't work in fbcode,
|
||||
# and it's not necessary anyway, because we have a stub
|
||||
|
@ -3134,7 +3134,7 @@ TEST_F(Composed, ComposedOp) {
|
||||
}
|
||||
|
||||
TEST(ConstantPropagation, CustomClassesCanBePropagated) {
|
||||
#ifdef USE_QNNPACK
|
||||
#ifdef USE_PYTORCH_QNNPACK
|
||||
const auto src = R"IR(
|
||||
graph():
|
||||
%none: NoneType = prim::Constant()
|
||||
|
1
third_party/neon2sse
vendored
1
third_party/neon2sse
vendored
Submodule third_party/neon2sse deleted from 97a126f08c
Reference in New Issue
Block a user