Skip to content

Commit 8759ba7

Browse files
committed
"Fix" static initialization order fiasco
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)
1 parent 46311f1 commit 8759ba7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/runtime/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ add_library(${lib_name} OBJECT)
44
set(CXX_SRCS
55
"${CMAKE_CURRENT_SOURCE_DIR}/CudaDevice.cpp"
66
"${CMAKE_CURRENT_SOURCE_DIR}/DeviceList.cpp"
7+
"${CMAKE_CURRENT_SOURCE_DIR}/TRTEngine.cpp"
78
"${CMAKE_CURRENT_SOURCE_DIR}/register_trt_op.cpp"
89
"${CMAKE_CURRENT_SOURCE_DIR}/runtime.cpp"
9-
"${CMAKE_CURRENT_SOURCE_DIR}/TRTEngine.cpp"
1010
)
1111

1212
set(HEADER_FILES

0 commit comments

Comments
 (0)