forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Caffe2 module update: move observers as well as binaries. (pytorch#2145)
* Caffe2 module update: move observers as well as binaries. * Add threads linkage * Add Threads dependency to public interface
- Loading branch information
Showing
45 changed files
with
101 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
caffe2/share/contrib/binaries/caffe2_benchmark/CMakeLists.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
find_package(Threads REQUIRED) | ||
# For newer CMake, Threads::Threads is already defined. Otherwise, we will | ||
# provide a backward compatible wrapper for Threads::Threads. | ||
if(THREADS_FOUND AND NOT TARGET Threads::Threads) | ||
add_library(Threads::Threads INTERFACE IMPORTED) | ||
|
||
if(THREADS_HAVE_PTHREAD_ARG) | ||
set_property( | ||
TARGET Threads::Threads | ||
PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread") | ||
endif() | ||
|
||
if(CMAKE_THREAD_LIBS_INIT) | ||
set_property( | ||
TARGET Threads::Threads | ||
PROPERTY INTERFACE_LINK_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
# ---[ Add modules | ||
add_subdirectory(detectron) | ||
add_subdirectory(module_test) | ||
add_subdirectory(observers) | ||
add_subdirectory(rocksdb) | ||
|
||
# Finally, set Caffe2_MODULES to parent scope. | ||
set(Caffe2_MODULES ${Caffe2_MODULES} PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
if (CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO) | ||
if (NOT USE_OBSERVERS) | ||
return() | ||
endif() | ||
else() | ||
cmake_minimum_required(VERSION 3.0 FATAL_ERROR) | ||
project(caffe2_observers CXX) | ||
find_package(Caffe2 REQUIRED) | ||
option(BUILD_SHARED_LIBS "Build shared libs." ON) | ||
endif() | ||
|
||
add_library(caffe2_observers | ||
"${CMAKE_CURRENT_SOURCE_DIR}/net_observer_reporter_print.cc" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/observer_config.cc" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/perf_observer.cc" | ||
) | ||
target_link_libraries(caffe2_observers PUBLIC caffe2_library) | ||
target_include_directories(caffe2_observers PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..) | ||
install(TARGETS caffe2_observers DESTINATION lib) | ||
caffe2_interface_library(caffe2_observers caffe2_observers_library) | ||
|
||
if (CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO) | ||
set(Caffe2_MODULES ${Caffe2_MODULES} caffe2_observers_library PARENT_SCOPE) | ||
endif() | ||
|
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
.../observers/net_observer_reporter_print.cc → .../observers/net_observer_reporter_print.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...b/observers/net_observer_reporter_print.h → ...s/observers/net_observer_reporter_print.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...hare/contrib/observers/observer_config.cc → modules/observers/observer_config.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...share/contrib/observers/observer_config.h → modules/observers/observer_config.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../share/contrib/observers/perf_observer.cc → modules/observers/perf_observer.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters