Skip to content

Commit

Permalink
Fix cuda linking bug (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkotila authored Oct 25, 2024
1 parent a73e338 commit 6962adf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/c++/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -271,7 +271,7 @@ if(TRITON_ENABLE_CC_GRPC)
simple_grpc_cudashm_client
PRIVATE
grpcclient_static
${CUDA_LIBRARIES}
CUDA::cudart
)
install(
TARGETS simple_grpc_cudashm_client
Expand Down Expand Up @@ -409,7 +409,7 @@ if(TRITON_ENABLE_CC_HTTP)
simple_http_cudashm_client
PRIVATE
httpclient_static
${CUDA_LIBRARIES}
CUDA::cudart
)
install(
TARGETS simple_http_cudashm_client
Expand Down
12 changes: 4 additions & 8 deletions src/c++/library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,8 @@ if(TRITON_ENABLE_CC_GRPC)
endif() # TRITON_ENABLE_GPU

if(TRITON_ENABLE_GPU)
target_link_libraries(
${_client_target}
PUBLIC CUDA::cudart
)
target_include_directories(${_client_target}
PUBLIC ${CUDAToolkit_INCLUDE_DIRS})
endif() # TRITON_ENABLE_GPU
endforeach()

Expand Down Expand Up @@ -477,10 +475,8 @@ if(TRITON_ENABLE_CC_HTTP)
endif() # TRITON_ENABLE_GPU

if(TRITON_ENABLE_GPU)
target_link_libraries(
${_client_target}
PUBLIC CUDA::cudart
)
target_include_directories(${_client_target}
PUBLIC ${CUDAToolkit_INCLUDE_DIRS})
endif() # TRITON_ENABLE_GPU

if(${TRITON_ENABLE_ZLIB})
Expand Down

0 comments on commit 6962adf

Please sign in to comment.