tqchen commented on a change in pull request #7706:
URL: https://github.com/apache/tvm/pull/7706#discussion_r597958168



##########
File path: src/runtime/logging.cc
##########
@@ -17,16 +17,15 @@
  * under the License.
  */
 
-#ifdef TVM_BACKTRACE_DISABLED
+#if TVM_USE_LIBBACKTRACE == 0
+#include <dmlc/logging.h>
+
 #include <string>
 
-// TODO(bkimball,tkonolige) This inline function is to work around a linking 
error I am having when
-// using MSVC If the function definition is in logging.cc then the linker 
can't find it no matter
-// what kind of attributes (dllexport) I decorate it with. This is temporary 
and will be addressed
-// when we get backtrace working on Windows.
 namespace tvm {
 namespace runtime {
-__declspec(dllexport) std::string Backtrace() { return ""; }
+// Fallback to the dmlc implementation when backtrace is not available.
+std::string Backtrace() { return dmlc::StackTrace(); }

Review comment:
       Given the fallback is less frequently used and this PR did fixes the 
previous problem and bring in new changes, I think this change is OK as it is. 
We can consider bring the new impl back later if needed.




-- 
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