Skip to content

Commit

Permalink
"Fix" static initialization order fiasco
Browse files Browse the repository at this point in the history
that's bad. within the runtime library, the call to TORCH_LIBRARY in
register_trt_op.cpp relies on the fact that TRTEngine is already
registrered, which is done through another static object initialization,
in a different compilation unit (TRTEngine.cpp)
  • Loading branch information
gcuendet committed May 9, 2022
1 parent 46311f1 commit 8759ba7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ add_library(${lib_name} OBJECT)
set(CXX_SRCS
"${CMAKE_CURRENT_SOURCE_DIR}/CudaDevice.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/DeviceList.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/TRTEngine.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/register_trt_op.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/runtime.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/TRTEngine.cpp"
)

set(HEADER_FILES
Expand Down

0 comments on commit 8759ba7

Please sign in to comment.