Skip to content

Commit

Permalink
Use add_definitions instead of set_source_file_properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor Morris authored and zhiics committed Feb 20, 2020
1 parent 7475796 commit 0b0bc3e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions cmake/modules/contrib/TensorRT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ if(USE_TENSORRT)
list(APPEND RUNTIME_SRCS src/relay/backend/contrib/tensorrt/common_utils.cc)

# Set defines
set_source_files_properties(${RUNTIME_GRAPH_SRCS}
PROPERTIES COMPILE_DEFINITIONS "TVM_GRAPH_RUNTIME_TENSORRT")
add_definitions(-DTVM_GRAPH_RUNTIME_TENSORRT)
endif()
# TensorRT Codegen only. This can be enabled independently of USE_TENSORRT to
# enable compilation of TensorRT modules without requiring TensorRT to be
Expand All @@ -56,9 +55,4 @@ if(USE_TENSORRT_CODEGEN)
file(GLOB TENSORRT_RELAY_CONTRIB_SRC src/relay/backend/contrib/tensorrt/*.cc)
list(APPEND COMPILER_SRCS ${TENSORRT_RELAY_CONTRIB_SRC})
list(APPEND COMPILER_SRCS src/runtime/contrib/tensorrt/tensorrt_module.cc)
# If runtime is enabled also, set flag for compiler srcs
if(USE_TENSORRT)
set_source_files_properties(${COMPILER_SRCS}
PROPERTIES COMPILE_DEFINITIONS "TVM_GRAPH_RUNTIME_TENSORRT")
endif()
endif()

0 comments on commit 0b0bc3e

Please sign in to comment.