Skip to content

Commit dcf3124

Browse files
committed
remove unnecessary cuda_runtime.h include, update cmake accordingly
1 parent 4f7a4fb commit dcf3124

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/torchcodec/_core/BetaCudaDeviceInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "src/torchcodec/_core/FFMPEGCommon.h"
1515
#include "src/torchcodec/_core/NVDECCache.h"
1616

17-
#include <cuda_runtime.h> // For cudaStreamSynchronize
17+
// #include <cuda_runtime.h> // For cudaStreamSynchronize
1818
#include "src/torchcodec/_core/nvcuvid_include/cuviddec.h"
1919
#include "src/torchcodec/_core/nvcuvid_include/nvcuvid.h"
2020

src/torchcodec/_core/CMakeLists.txt

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ function(make_torchcodec_libraries
107107
)
108108

109109
if(ENABLE_CUDA)
110-
list(APPEND core_library_dependencies
111-
${CUDA_nppi_LIBRARY}
112-
${CUDA_nppicc_LIBRARY}
113-
)
114-
115110
# Try to find NVCUVID. Try the normal way first. This should work locally.
116111
find_library(NVCUVID_LIBRARY NAMES nvcuvid)
117112
# If not found, try with version suffix, or hardcoded path. Appears
@@ -129,11 +124,11 @@ function(make_torchcodec_libraries
129124
message(FATAL_ERROR "Could not find NVCUVID library")
130125
endif()
131126

132-
# Add CUDA Driver library (needed for cuCtxGetCurrent, etc.)
133-
find_library(CUDA_DRIVER_LIBRARY NAMES cuda REQUIRED)
134-
message(STATUS "Found CUDA Driver library: ${CUDA_DRIVER_LIBRARY}")
135-
136-
list(APPEND core_library_dependencies ${NVCUVID_LIBRARY} ${CUDA_DRIVER_LIBRARY})
127+
list(APPEND core_library_dependencies
128+
${CUDA_nppi_LIBRARY}
129+
${CUDA_nppicc_LIBRARY}
130+
${NVCUVID_LIBRARY}
131+
)
137132
endif()
138133

139134
make_torchcodec_sublibrary(

0 commit comments

Comments
 (0)