forked from mindspore-Ecosystem/mindspore
!39329 [MS][Lite][Task] solve compile problem
Merge pull request !39329 from 刘力力/master_develop
This commit is contained in:
commit
4f6a4716d9
|
@ -481,27 +481,23 @@ if(MSLITE_ENABLE_MINDRT)
|
|||
endif()
|
||||
|
||||
if(SUPPORT_TENSORRT)
|
||||
if(NOT MSLITE_ENABLE_CLOUD_FUSION_INFERENCE)
|
||||
add_compile_definitions(GPU_TENSORRT)
|
||||
set(TENSORRT_PATH $ENV{TENSORRT_PATH})
|
||||
set(CUDA_PATH $ENV{CUDA_HOME})
|
||||
set(TENSORRT_LIB_PATH ${TENSORRT_PATH}/lib)
|
||||
set(CUDA_LIB_PATH ${CUDA_PATH}/lib64)
|
||||
include_directories(${TENSORRT_PATH}/include)
|
||||
include_directories(${CUDA_PATH}/include)
|
||||
add_subdirectory(litert/delegate/tensorrt)
|
||||
target_link_libraries(mindspore-lite tensorrt_kernel_mid cuda_kernel_mid gpu_distribution_collective)
|
||||
target_link_libraries(mindspore-lite_static tensorrt_kernel_mid cuda_kernel_mid gpu_distribution_collective)
|
||||
endif()
|
||||
add_compile_definitions(GPU_TENSORRT)
|
||||
set(TENSORRT_PATH $ENV{TENSORRT_PATH})
|
||||
set(CUDA_PATH $ENV{CUDA_HOME})
|
||||
set(TENSORRT_LIB_PATH ${TENSORRT_PATH}/lib)
|
||||
set(CUDA_LIB_PATH ${CUDA_PATH}/lib64)
|
||||
include_directories(${TENSORRT_PATH}/include)
|
||||
include_directories(${CUDA_PATH}/include)
|
||||
add_subdirectory(litert/delegate/tensorrt)
|
||||
target_link_libraries(mindspore-lite tensorrt_kernel_mid cuda_kernel_mid gpu_distribution_collective)
|
||||
target_link_libraries(mindspore-lite_static tensorrt_kernel_mid cuda_kernel_mid gpu_distribution_collective)
|
||||
else()
|
||||
if(NOT MSLITE_ENABLE_CLOUD_FUSION_INFERENCE)
|
||||
set(TENSORRT_STUB
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/litert/delegate/tensorrt/distribution/distribution_base.cc
|
||||
)
|
||||
add_library(tensorrt_stub OBJECT ${TENSORRT_STUB})
|
||||
target_link_libraries(mindspore-lite tensorrt_stub)
|
||||
target_link_libraries(mindspore-lite_static tensorrt_stub)
|
||||
endif()
|
||||
set(TENSORRT_STUB
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/litert/delegate/tensorrt/distribution/distribution_base.cc
|
||||
)
|
||||
add_library(tensorrt_stub OBJECT ${TENSORRT_STUB})
|
||||
target_link_libraries(mindspore-lite tensorrt_stub)
|
||||
target_link_libraries(mindspore-lite_static tensorrt_stub)
|
||||
endif()
|
||||
|
||||
if(MSLITE_GPU_BACKEND STREQUAL opencl)
|
||||
|
|
Loading…
Reference in New Issue