tqchen commented on a change in pull request #8373:
URL: https://github.com/apache/tvm/pull/8373#discussion_r661870316
##########
File path: CMakeLists.txt
##########
@@ -635,3 +635,15 @@ if(APPLE AND TVM_IS_DEBUG_BUILD)
VERBATIM
)
endif()
+
+# Caches the build.
+# Note that ccache-3.x doesn't support nvcc well, so CUDA kernels may never
hit the cache and still
+# need to be re-compiled every time. Using ccache 4.0+ can resolve this issue.
+
+if(USE_CCACHE)
+ find_program(CCACHE_FOUND ccache)
+ if(CCACHE_FOUND)
Review comment:
We might want to feed the result of find_program to the variable, in
case ccache is not in path but find_program manages to find it
##########
File path: CMakeLists.txt
##########
@@ -635,3 +635,15 @@ if(APPLE AND TVM_IS_DEBUG_BUILD)
VERBATIM
)
endif()
+
+# Caches the build.
+# Note that ccache-3.x doesn't support nvcc well, so CUDA kernels may never
hit the cache and still
+# need to be re-compiled every time. Using ccache 4.0+ can resolve this issue.
+
+if(USE_CCACHE)
+ find_program(CCACHE_FOUND ccache)
+ if(CCACHE_FOUND)
+ message(STATUS "Enabling ccache")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
Review comment:
would be grgeat to check if we can use set CXX_COMPILER_LAUNCHER here
and get the same goal
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]