trevor-m commented on a change in pull request #7436:
URL: https://github.com/apache/tvm/pull/7436#discussion_r573956757



##########
File path: cmake/modules/contrib/TensorRT.cmake
##########
@@ -28,7 +28,9 @@ if(USE_TENSORRT_CODEGEN)
     file(GLOB RUNTIME_TENSORRT_SRCS 
src/runtime/contrib/tensorrt/tensorrt_runtime.cc)
     set_source_files_properties(${RUNTIME_TENSORRT_SRCS} PROPERTIES 
COMPILE_FLAGS "-Wno-deprecated-declarations")
     list(APPEND COMPILER_SRCS ${COMPILER_TENSORRT_SRCS})
-    list(APPEND COMPILER_SRCS ${RUNTIME_TENSORRT_SRCS})
+    if(NOT USE_TENSORRT_RUNTIME)
+        list(APPEND COMPILER_SRCS ${RUNTIME_TENSORRT_SRCS})

Review comment:
       During codegen, a runtime module needs to be created, so we still need 
the source file where the custom runtime module is defined so that it can 1) be 
created and 2) SaveToBinary can be called on it.
   
   
https://github.com/apache/tvm/blob/main/src/relay/backend/contrib/tensorrt/codegen.cc#L208
   
https://github.com/apache/tvm/blob/main/src/relay/backend/contrib/arm_compute_lib/codegen.cc#L370
   
   We could add the files to runtime instead, I don't think it would make a 
difference.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to