File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -71,20 +71,26 @@ if(NOT LIBKINETO_NOCUPTI)
7171 NO_DEFAULT_PATH)
7272 endif ()
7373
74- if (USE_CUPTI_SO)
75- if (NOT CUDA_cupti_LIBRARY)
76- find_library (CUDA_cupti_LIBRARY cupti PATHS ${CUDA_PATHS}
77- NO_DEFAULT_PATH)
78- endif ()
79- set (cupti_LIBRARY ${CUDA_cupti_LIBRARY} )
80- else ()
81- if (NOT CUDA_cupti_static_LIBRARY)
82- find_library (CUDA_cupti_static_LIBRARY cupti_static PATHS ${CUDA_PATHS}
83- NO_DEFAULT_PATH)
74+ if (NOT USE_CUPTI_SO AND NOT CUDA_cupti_static_LIBRARY)
75+ set (cupti_static_libs "cupti_static" )
76+ if (WIN32 )
77+ list (APPEND cupti_static_libs "cupti" )
78+ find_library (CUDA_cupti_static_LIBRARY cupti_static cupti PATHS ${CUDA_PATHS}
79+ NO_DEFAULT_PATH)
8480 endif ()
81+ endif ()
82+ if (CUDA_cupti_static_LIBRARY)
8583 set (cupti_LIBRARY ${CUDA_cupti_static_LIBRARY} )
8684 endif ()
8785
86+ if (USE_CUPTI_SO AND NOT CUDA_cupti_LIBRARY)
87+ find_library (CUDA_cupti_LIBRARY cupti PATHS ${CUDA_PATHS}
88+ NO_DEFAULT_PATH)
89+ endif ()
90+ if (CUDA_cupti_LIBRARY)
91+ set (cupti_LIBRARY ${CUDA_cupti_LIBRARY} )
92+ endif ()
93+
8894 if (cupti_LIBRARY AND CUPTI_INCLUDE_DIR)
8995 message (STATUS " CUPTI_INCLUDE_DIR = ${CUPTI_INCLUDE_DIR} " )
9096 message (STATUS " CUDA_cupti_LIBRARY = ${CUDA_cupti_LIBRARY} " )
You can’t perform that action at this time.
0 commit comments