Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cuda graph support (#92) #95

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,21 @@ FetchContent_MakeAvailable(repo-common repo-core repo-backend)
#
if(${TRITON_ENABLE_GPU})
find_package(CUDAToolkit REQUIRED)
message(STATUS "Using CUDA ${CUDA_VERSION}")
message(STATUS "Using CUDA ${CUDAToolkit_VERSION}")
if (WIN32)
set(CUDA_NVCC_FLAGS -std=c++17)
else ()
set(CUDA_NVCC_FLAGS -std=c++11)
endif ()

if(CUDA_VERSION VERSION_GREATER "10.1" OR CUDA_VERSION VERSION_EQUAL "10.1")
if(NOT DEFINED CUDAToolkit_VERSION)
message( FATAL_ERROR "Unable to determine CUDAToolkit_VERSION, CMake will exit." )
endif()

if(CUDAToolkit_VERSION VERSION_GREATER "10.1" OR CUDAToolkit_VERSION VERSION_EQUAL "10.1")
add_definitions(-DTRITON_ENABLE_CUDA_GRAPH=1)
else()
message(WARNING "CUDA ${CUDA_VERSION} does not support CUDA graphs.")
message(WARNING "CUDA ${CUDAToolkit_VERSION} does not support CUDA graphs.")
endif()
else()
message( FATAL_ERROR "TensorRT backend requires TRITON_ENABLE_GPU=1, CMake will exit." )
Expand Down
Loading