summaryrefslogtreecommitdiff
blob: ac74edadab357e98aeb6903f7a13315d4eb28546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
--- a/cmake/Dependencies.cmake	2022-06-17 22:12:34.451841710 +0200
+++ b/cmake/Dependencies.cmake	2022-06-17 22:12:48.302786501 +0200
@@ -1512,7 +1512,6 @@
   if(NOT USE_SYSTEM_ONNX)
     add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/onnx EXCLUDE_FROM_ALL)
   endif()
-  add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/foxi EXCLUDE_FROM_ALL)
 
   add_definitions(-DONNX_NAMESPACE=${ONNX_NAMESPACE})
   if(NOT USE_SYSTEM_ONNX)
@@ -1810,7 +1809,6 @@
 #
 set(TEMP_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
 set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE)
-add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
 
 # Disable compiler feature checks for `fmt`.
 #
@@ -1819,9 +1817,7 @@
 # CMAKE_CXX_FLAGS in ways that break feature checks. Since we already know
 # `fmt` is compatible with a superset of the compilers that PyTorch is, it
 # shouldn't be too bad to just disable the checks.
-set_target_properties(fmt-header-only PROPERTIES INTERFACE_COMPILE_FEATURES "")
 
-list(APPEND Caffe2_DEPENDENCY_LIBS fmt::fmt-header-only)
 set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS} CACHE BOOL "Build shared libs" FORCE)
 
 if(USE_BREAKPAD)
--- a/c10/CMakeLists.txt	2022-06-17 22:40:53.573306905 +0200
+++ b/c10/CMakeLists.txt	2022-06-17 22:41:16.920219686 +0200
@@ -59,7 +59,7 @@
 if(${USE_GLOG})
     target_link_libraries(c10 PUBLIC glog::glog)
 endif()
-target_link_libraries(c10 PRIVATE fmt::fmt-header-only)
+target_link_libraries(c10 PRIVATE fmt)
 
 find_package(Backtrace)
 if(Backtrace_FOUND)
--- a/torch/CMakeLists.txt	2022-06-17 22:42:20.396982644 +0200
+++ b/torch/CMakeLists.txt	2022-06-17 22:43:20.214759326 +0200
@@ -82,7 +82,6 @@
 
 set(TORCH_PYTHON_LINK_LIBRARIES
     shm
-    fmt::fmt-header-only
     ATEN_CPU_FILES_GEN_LIB)
 
 set(TORCH_PYTHON_COMPILE_DEFINITIONS)
--- a/CMakeLists.txt	2022-06-18 20:35:01.451116185 +0200
+++ b/CMakeLists.txt	2022-06-18 20:35:08.219023569 +0200
@@ -750,7 +750,7 @@
 
 # ---[ Build flags
 if(NOT MSVC)
-  string(APPEND CMAKE_CXX_FLAGS " -O2 -fPIC")
+  string(APPEND CMAKE_CXX_FLAGS " -fPIC")
   string(APPEND CMAKE_CXX_FLAGS " -Wno-narrowing")
   # Eigen fails to build with some versions, so convert this to a warning
   # Details at http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1459
--- a/cmake/public/utils.cmake	2022-06-18 20:50:39.314263395 +0200
+++ b/cmake/public/utils.cmake	2022-06-18 20:51:49.611291709 +0200
@@ -512,8 +512,6 @@
   endif()
 
   # Use -O2 for release builds (-O3 doesn't improve perf, and -Os results in perf regression)
-  target_compile_options(${libname} PRIVATE
-      $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>>:-O2>)
 
 endfunction()
 
--- a/cmake/Codegen.cmake	2022-06-18 21:33:13.366381817 +0200
+++ b/cmake/Codegen.cmake	2022-06-18 21:33:30.249157610 +0200
@@ -57,7 +57,7 @@
   if(MSVC)
     set(OPT_FLAG "/fp:strict ")
   else(MSVC)
-    set(OPT_FLAG "-O3 ")
+    set(OPT_FLAG " ")
     if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
       set(OPT_FLAG " ")
     endif()
--- a/c10/CMakeLists.txt	2022-06-19 09:57:16.776536871 +0200
+++ b/c10/CMakeLists.txt	2022-06-19 09:58:51.663356075 +0200
@@ -107,7 +107,7 @@
 # Note: for now, we will put all export path into one single Caffe2Targets group
 # to deal with the cmake deployment need. Inside the Caffe2Targets set, the
 # individual libraries like libc10.so and libcaffe2.so are still self-contained.
-install(TARGETS c10 EXPORT Caffe2Targets DESTINATION lib)
+install(TARGETS c10 EXPORT Caffe2Targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
 install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
         DESTINATION include
         FILES_MATCHING PATTERN "*.h")