mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
Revert D31082208: Use shared CUPTI by default
Test Plan: revert-hammer
Differential Revision:
D31082208 (8b0eae5aa8)
Original commit changeset: 14f66af92084
fbshipit-source-id: 0faff00832b7f79d476fd1f9f505142a548a76db
This commit is contained in:
parent
9984f4bb8b
commit
3ac2c74896
|
|
@ -206,7 +206,7 @@ cmake_dependent_option(
|
|||
option(USE_FBGEMM "Use FBGEMM (quantized 8-bit server operators)" ON)
|
||||
option(USE_KINETO "Use Kineto profiling library" ON)
|
||||
option(USE_BREAKPAD "Use breakpad crash dump library" ON)
|
||||
option(USE_CUPTI_SO "Use CUPTI as a shared library" ON)
|
||||
option(USE_CUPTI_SO "Use CUPTI as a shared library" OFF)
|
||||
option(USE_FAKELOWP "Use FakeLowp operators" OFF)
|
||||
option(USE_FFMPEG "Use ffmpeg" OFF)
|
||||
option(USE_GFLAGS "Use GFLAGS" OFF)
|
||||
|
|
|
|||
|
|
@ -1960,24 +1960,6 @@ if(USE_KINETO)
|
|||
message(STATUS " CUDA_cupti_LIBRARY = ${CUDA_cupti_LIBRARY}")
|
||||
message(STATUS "Found CUPTI")
|
||||
set(LIBKINETO_NOCUPTI OFF CACHE STRING "" FORCE)
|
||||
|
||||
include(CheckCXXSourceRuns)
|
||||
unset(EXCEPTIONS_WORK CACHE)
|
||||
set(CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--whole-archive,${CUPTI_LIBRARY_PATH},--no-whole-archive")
|
||||
check_cxx_source_runs("#include <stdexcept>
|
||||
int main() {
|
||||
try {
|
||||
throw std::runtime_error(\"error\");
|
||||
} catch (...) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}" EXCEPTIONS_WORK)
|
||||
set(CMAKE_REQUIRED_LINK_OPTIONS "")
|
||||
if(NOT EXCEPTIONS_WORK)
|
||||
message(FATAL_ERROR "Detected that statically linking against CUPTI causes exceptions to stop working. See https://github.com/pytorch/pytorch/issues/57744 for more details. Perhaps try: USE_CUPTI_SO=1 python setup.py develop --cmake")
|
||||
endif()
|
||||
|
||||
else()
|
||||
message(STATUS "Could not find CUPTI library, using CPU-only Kineto build")
|
||||
set(LIBKINETO_NOCUPTI ON CACHE STRING "" FORCE)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user