Skip to content

Commit

Permalink
[Submodule] Remove zstd dependency (pytorch#126485)
Browse files Browse the repository at this point in the history
After searching in the codebase, it seems that zstd is not in use now.

Pull Request resolved: pytorch#126485
Approved by: https://github.com/ezyang
  • Loading branch information
cyyever authored and pytorchmergebot committed May 17, 2024
1 parent 6c503f1 commit 4ed93d6
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
ignore = dirty
path = third_party/psimd
url = https://github.com/Maratyszcza/psimd.git
[submodule "third_party/zstd"]
ignore = dirty
path = third_party/zstd
url = https://github.com/facebook/zstd.git
[submodule "third_party/cpuinfo"]
ignore = dirty
path = third_party/cpuinfo
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ option(USE_VULKAN_FP16_INFERENCE "Vulkan - Use fp16 inference" OFF)
option(USE_VULKAN_RELAXED_PRECISION "Vulkan - Use relaxed precision math in the kernels (mediump)" OFF)
# option USE_XNNPACK: try to enable xnnpack by default.
option(USE_XNNPACK "Use XNNPACK" ON)
option(USE_ZSTD "Use ZSTD" OFF)
option(USE_ROCM_KERNEL_ASSERT "Use Kernel Assert for ROCm" OFF)
# Ensure that an ITT build is the default for x86 CPUs
cmake_dependent_option(
Expand Down Expand Up @@ -413,7 +412,6 @@ option(USE_SYSTEM_FXDIV "Use system-provided fxdiv." OFF)
option(USE_SYSTEM_BENCHMARK "Use system-provided google benchmark." OFF)
option(USE_SYSTEM_ONNX "Use system-provided onnx." OFF)
option(USE_SYSTEM_XNNPACK "Use system-provided xnnpack." OFF)
option(USE_SYSTEM_ZSTD "Use system-provided zstd." OFF)
option(USE_GOLD_LINKER "Use ld.gold to link" OFF)
if(USE_SYSTEM_LIBS)
set(USE_SYSTEM_CPUINFO ON)
Expand All @@ -435,9 +433,6 @@ if(USE_SYSTEM_LIBS)
if(USE_TBB)
set(USE_SYSTEM_TBB ON)
endif()
if(USE_ZSTD)
set(USE_SYSTEM_ZSTD ON)
endif()
endif()

# Used when building Caffe2 through setup.py
Expand Down
19 changes: 0 additions & 19 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1426,25 +1426,6 @@ if(USE_NNAPI AND NOT ANDROID)
caffe2_update_option(USE_NNAPI OFF)
endif()

if(USE_ZSTD)
if(USE_SYSTEM_ZSTD)
find_package(zstd REQUIRED)
if(TARGET zstd::libzstd_shared)
set(ZSTD_TARGET zstd::libzstd_shared)
else()
set(ZSTD_TARGET zstd::libzstd_static)
endif()
list(APPEND Caffe2_DEPENDENCY_LIBS ${ZSTD_TARGET})
get_property(ZSTD_INCLUDE_DIR TARGET ${ZSTD_TARGET} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${ZSTD_INCLUDE_DIR})
else()
list(APPEND Caffe2_DEPENDENCY_LIBS libzstd_static)
include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/zstd/lib)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/zstd/build/cmake)
set_property(TARGET libzstd_static PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
endif()

# ---[ Onnx
if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
if(EXISTS "${CAFFE2_CUSTOM_PROTOC_EXECUTABLE}")
Expand Down
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@
# USE_REDIS
# Whether to use Redis for distributed workflows (Linux only)
#
# USE_ZSTD
# Enables use of ZSTD, if the libraries are found
#
# USE_ROCM_KERNEL_ASSERT=1
# Enable kernel assert in ROCm platform
#
Expand Down
1 change: 0 additions & 1 deletion third_party/zstd
Submodule zstd deleted from aec56a

0 comments on commit 4ed93d6

Please sign in to comment.