mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Allow optional build and installation of native test binaries (#8225)
* test finetuning * install off by default * Turn BUILD_TEST=ON for jenkins. * Turn on install_test in jenkins as well
This commit is contained in:
parent
8af88f3525
commit
b401e6b03a
3 changed files with 9 additions and 3 deletions
|
|
@ -67,7 +67,6 @@ report_compile_cache_stats() {
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Explicitly set Python executable.
|
||||
###############################################################################
|
||||
|
|
@ -118,6 +117,8 @@ fi
|
|||
# Set cmake args
|
||||
###############################################################################
|
||||
CMAKE_ARGS+=("-DBUILD_BINARY=ON")
|
||||
CMAKE_ARGS+=("-DBUILD_TEST=ON")
|
||||
CMAKE_ARGS+=("-DINSTALL_TEST=ON")
|
||||
CMAKE_ARGS+=("-DUSE_OBSERVERS=ON")
|
||||
CMAKE_ARGS+=("-DUSE_ZSTD=ON")
|
||||
CMAKE_ARGS+=("-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}")
|
||||
|
|
|
|||
|
|
@ -57,8 +57,11 @@ cmake_dependent_option(
|
|||
CAFFE2_USE_MSVC_STATIC_RUNTIME "Using MSVC static runtime libraries" ON
|
||||
"NOT BUILD_SHARED_LIBS" OFF)
|
||||
cmake_dependent_option(
|
||||
BUILD_TEST "Build Caffe2 C++ test binaries (need gtest and gbenchmark)" ON
|
||||
BUILD_TEST "Build Caffe2 C++ test binaries (need gtest and gbenchmark)" OFF
|
||||
"BUILD_CAFFE2" OFF)
|
||||
cmake_dependent_option(
|
||||
INSTALL_TEST "Install test binaries if BUILD_TEST is on" OFF
|
||||
"BUILD_TEST" OFF)
|
||||
option(USE_ACL "Use ARM Compute Library" OFF)
|
||||
option(USE_ASAN "Use Address Sanitizer" OFF)
|
||||
option(USE_ATEN "Use ATen" OFF)
|
||||
|
|
|
|||
|
|
@ -289,7 +289,9 @@ if(BUILD_CAFFE2)
|
|||
target_compile_features(${test_name} PRIVATE cxx_range_for)
|
||||
endif()
|
||||
add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
|
||||
install(TARGETS ${test_name} DESTINATION test)
|
||||
if (INSTALL_TEST)
|
||||
install(TARGETS ${test_name} DESTINATION test)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(USE_ROCM)
|
||||
|
|
|
|||
Loading…
Reference in a new issue