pytorch/caffe2/observers/CMakeLists.txt
Martin Schatz 5b835682e3 Remove GPU dependency from ProfileObserver (#17592)
Summary:
Remove GPU dependency and register ProfileObserver.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17592

Reviewed By: ezyang

Differential Revision: D14265801

Pulled By: mdschatz

fbshipit-source-id: f98c0c32653c64a8b087c58ece4f864dfbe1d4b8
2019-03-04 10:00:46 -08:00

17 lines
582 B
CMake

if(USE_OBSERVERS)
message(STATUS "Include Observer library")
set(Caffe2_CONTRIB_OBSERVERS_CPU_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/profile_observer.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/time_observer.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/runcnt_observer.cc"
)
set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} ${Caffe2_CONTRIB_OBSERVERS_CPU_SRC})
set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} PARENT_SCOPE)
# ---[ CPU test files
file(GLOB tmp *_test.cc)
set(Caffe2_CPU_TEST_SRCS ${Caffe2_CPU_TEST_SRCS} ${tmp})
set(Caffe2_CPU_TEST_SRCS ${Caffe2_CPU_TEST_SRCS} PARENT_SCOPE)
endif()